﻿:root {
    --bg: #ffffff;
    --bg-soft: #f8f5fb;
    --bg-deep: #241436;
    --card: #ffffff;
    --purple-deep: #241436;
    --purple: #5b3a8e;
    --purple-pale: #efe9f7;
    --gold: #a8790a;
    --gold-bright: #d9a62e;
    --gold-soft: #f3e6c8;
    --ink: #241436;
    --ink-dim: #6b6478;
    --line: #e7e1f0;
    --radius: 16px;
    --max: 1180px;
    --shadow-sm: 0 2px 10px rgba(46, 26, 71, .06);
    --shadow-md: 0 16px 40px rgba(46, 26, 71, .14);
    --font-display: 'Noto Naskh Arabic', serif;
    --font-body: 'Vazirmatn', sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

button {
    font-family: inherit;
    cursor: pointer;
}

:focus-visible {
    outline: 2px solid var(--purple);
    outline-offset: 3px;
}

::selection {
    background: var(--gold-soft);
    color: var(--purple-deep);
}

.wrap {
    max-width: var(--max);
    margin-inline: auto;
    padding-inline: clamp(20px, 5vw, 56px);
}

.skip-link {
    position: absolute;
    right: 16px;
    top: -60px;
    background: #fff;
    color: var(--purple-deep);
    padding: 10px 18px;
    z-index: 200;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    transition: top .2s ease;
}

    .skip-link:focus {
        top: 16px;
    }

/* ---------- Reading progress ---------- */
.progress {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    z-index: 60;
    background: transparent;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--purple), var(--gold-bright));
    transition: width .1s linear;
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    transition: box-shadow .25s ease;
}

    .site-header.scrolled {
        box-shadow: var(--shadow-sm);
    }

    .site-header .wrap {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-block: 18px;
    }

.logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: .3px;
    color: var(--purple-deep);
}

    .logo span {
        font-family: var(--font-body);
        color: var(--gold);
        font-weight: 600;
        font-size: .82rem;
        margin-inline-start: 10px;
    }

.nav-links {
    display: flex;
    gap: 36px;
}

    .nav-links a {
        font-size: .95rem;
        color: var(--ink-dim);
        position: relative;
        padding-block: 4px;
        transition: color .2s ease;
    }

        .nav-links a:hover {
            color: var(--purple-deep);
        }

        .nav-links a::after {
            content: '';
            position: absolute;
            right: 0;
            bottom: -2px;
            width: 0;
            height: 2px;
            background: var(--gold-bright);
            transition: width .25s ease;
        }

        .nav-links a:hover::after {
            width: 100%;
        }

.menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--line);
    border-radius: 8px;
    width: 42px;
    height: 38px;
    align-items: center;
    justify-content: center;
}

    .menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
        content: '';
        display: block;
        width: 20px;
        height: 2px;
        background: var(--purple-deep);
        position: relative;
        transition: transform .25s ease, opacity .25s ease;
    }

        .menu-toggle span::before {
            position: absolute;
            top: -6px;
        }

        .menu-toggle span::after {
            position: absolute;
            top: 6px;
        }

    .menu-toggle.open span {
        background: transparent;
    }

        .menu-toggle.open span::before {
            transform: translateY(6px) rotate(45deg);
        }

        .menu-toggle.open span::after {
            transform: translateY(-6px) rotate(-45deg);
        }

/* ---------- Hero ---------- */
.hero {
    padding-block: clamp(64px, 11vw, 132px) clamp(34px, 6vw, 64px);
    position: relative;
    overflow: hidden;
}

    .hero::before {
        content: '';
        position: absolute;
        inset: 0;
        z-index: -1;
        background: radial-gradient(circle at 88% -5%, rgba(217,166,46,.14), transparent 45%), radial-gradient(circle at -5% 40%, rgba(91,58,142,.10), transparent 45%);
    }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: .84rem;
    color: var(--gold);
    font-weight: 600;
    letter-spacing: .5px;
    margin-bottom: 20px;
}

    .eyebrow::before {
        content: '';
        width: 26px;
        height: 2px;
        background: var(--gold-bright);
    }

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.3rem, 5.6vw, 4.4rem);
    font-weight: 700;
    margin: 0 0 24px;
    max-width: 15ch;
    line-height: 1.35;
    color: var(--purple-deep);
}

    .hero h1 em {
        font-style: normal;
        color: var(--gold);
    }

.hero p {
    max-width: 52ch;
    color: var(--ink-dim);
    font-size: clamp(1rem, 1.3vw, 1.15rem);
    margin-bottom: 36px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--purple-deep);
    color: #fff;
    font-weight: 700;
    font-size: .95rem;
    padding: 14px 30px;
    border-radius: 999px;
    border: none;
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

    .btn:hover {
        background: var(--purple);
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

    .btn.gold {
        background: var(--gold-bright);
        color: #2c1c05;
    }

        .btn.gold:hover {
            background: var(--gold);
        }

    .btn.ghost {
        background: transparent;
        color: var(--purple-deep);
        border: 1px solid var(--line);
        box-shadow: none;
    }

        .btn.ghost:hover {
            border-color: var(--purple);
            background: var(--purple-pale);
            transform: none;
        }

/* signature ink-stroke divider */
.ink-divider {
    width: 100%;
    height: 64px;
    margin-block: 16px 8px;
}

    .ink-divider path {
        fill: none;
        stroke: url(#inkGrad);
        stroke-width: 2.4;
        stroke-linecap: round;
        stroke-dasharray: 1400;
        stroke-dashoffset: 1400;
        animation: draw 2.4s ease forwards .3s;
    }

@keyframes draw {
    to {
        stroke-dashoffset: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ink-divider path {
        animation: none;
        stroke-dashoffset: 0;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ---------- Section shell ---------- */
.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 38px;
    flex-wrap: wrap;
}

    .section-head .kicker {
        font-size: .8rem;
        color: var(--gold);
        font-weight: 600;
        letter-spacing: .5px;
        display: block;
        margin-bottom: 8px;
    }

    .section-head h2 {
        font-family: var(--font-display);
        font-size: clamp(1.6rem, 3vw, 2.3rem);
        font-weight: 700;
        margin: 0;
        color: var(--purple-deep);
    }

    .section-head p {
        color: var(--ink-dim);
        margin: 8px 0 0;
        max-width: 46ch;
    }

/* ---------- Posts ---------- */
.posts {
    padding-block: clamp(34px,6vw,64px) clamp(54px,8vw,96px);
}

.featured {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 26px;
    transition: box-shadow .25s ease, border-color .25s ease;
}

    .featured:hover {
        box-shadow: var(--shadow-md);
        border-color: var(--gold-bright);
    }

@media (min-width: 720px) {
    .featured {
        grid-template-columns: 1.1fr 1fr;
    }
}

.featured-media {
    aspect-ratio: 16/10;
    background: radial-gradient(circle at 25% 15%, rgba(217,166,46,.35), transparent 55%), linear-gradient(135deg, #efe9f7, #f8f5fb);
    position: relative;
}

.featured-body {
    padding: clamp(24px, 4vw, 44px);
    display: flex;
    flex-direction: column;
    gap: 14px;
    justify-content: center;
}

.card-tag {
    display: inline-flex;
    width: fit-content;
    background: var(--purple-pale);
    color: var(--purple);
    font-size: .74rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 999px;
}

.featured-body h3 {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 2.4vw, 1.9rem);
    font-weight: 700;
    margin: 0;
    color: var(--purple-deep);
    line-height: 1.5;
}

.featured-body p {
    color: var(--ink-dim);
    margin: 0;
    font-size: .98rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
}


.card {
    container-type: inline-size;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

    .card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-md);
        border-color: var(--gold-bright);
    }

.card-media {
    aspect-ratio: 16/10;
    background: radial-gradient(circle at 30% 20%, rgba(217,166,46,.30), transparent 60%), linear-gradient(135deg, #efe9f7, #f8f5fb);
    position: relative;
}

    .card-media .card-tag {
        position: absolute;
        top: 14px;
        right: 14px;
        background: rgba(255,255,255,.9);
        border: 1px solid var(--purple-pale);
    }

.card-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.card-meta {
    display: flex;
    gap: 12px;
    font-size: .78rem;
    color: var(--ink-dim);
}

.card h3 {
    font-size: 1.08rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.6;
    color: var(--purple-deep);
}

.card p {
    font-size: .92rem;
    color: var(--ink-dim);
    margin: 0;
}

.card-link {
    font-size: .85rem;
    color: var(--gold);
    font-weight: 700;
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    .card-link svg {
        width: 14px;
        height: 14px;
        transition: transform .2s ease;
    }

.card:hover .card-link svg {
    transform: translateX(-4px);
}

@container (min-width: 420px) {
    .card {
        display: flex;
    }

    .card-media {
        width: 42%;
        aspect-ratio: auto;
    }

    .card-body {
        width: 58%;
    }
}

/* ---------- About ---------- */
.about {
    background: var(--bg-soft);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding-block: clamp(50px,8vw,96px);
}

.about-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
}

@media (min-width: 760px) {
    .about-inner {
        grid-template-columns: 220px 1fr;
    }
}

.avatar {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple), var(--gold-bright));
    margin-inline: auto;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 3rem;
    color: #fff;
    font-weight: 700;
}

.about-copy h2 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem,3vw,2.1rem);
    margin: 0 0 14px;
    color: var(--purple-deep);
}

.about-copy p {
    color: var(--ink-dim);
    max-width: 60ch;
    margin: 0 0 22px;
}

.stats {
    display: flex;
    gap: clamp(24px,5vw,54px);
    flex-wrap: wrap;
}

.stat b {
    font-family: var(--font-display);
    display: block;
    font-size: 1.7rem;
    color: var(--purple-deep);
}

.stat span {
    font-size: .82rem;
    color: var(--ink-dim);
}

/* ---------- Contact ---------- */
.contact {
    padding-block: clamp(54px,8vw,96px);
}

.contact-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

@media (min-width: 760px) {
    .contact-inner {
        grid-template-columns: 1fr 1.1fr;
        align-items: center;
    }
}

.contact-copy h2 {
    font-family: var(--font-display);
    font-size: clamp(1.6rem,3vw,2.3rem);
    margin: 0 0 14px;
    color: var(--purple-deep);
}

.contact-copy p {
    color: var(--ink-dim);
    max-width: 42ch;
}

form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(20px,3vw,30px);
    box-shadow: var(--shadow-sm);
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

label {
    font-size: .85rem;
    color: var(--ink-dim);
    font-weight: 600;
}

input, textarea {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 13px 16px;
    color: var(--ink);
    font-family: inherit;
    font-size: .95rem;
    transition: border-color .2s ease, box-shadow .2s ease;
}

    input:focus, textarea:focus {
        border-color: var(--purple);
        box-shadow: 0 0 0 3px rgba(91,58,142,.12);
        outline: none;
    }

textarea {
    resize: vertical;
    min-height: 110px;
}

.form-msg {
    font-size: .88rem;
    min-height: 20px;
    color: var(--purple);
}

    .form-msg[data-state="error"] {
        color: #b3261e;
    }


/* ---------- Footer ---------- */
footer {
    padding-block: clamp(44px,7vw,68px) 30px;
    background: var(--purple-deep);
    color: #efe9f7;
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    gap: 26px;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,.12);
    margin-bottom: 24px;
}

footer .logo {
    color: #fff;
}

    footer .logo span {
        color: var(--gold-bright);
    }

.social-row {
    display: flex;
    gap: 14px;
}

.social-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.16);
    transition: border-color .2s ease, transform .2s ease, color .2s ease, background .2s ease;
    color: #d8d0e8;
}

    .social-btn svg {
        width: 19px;
        height: 19px;
    }

    .social-btn:hover {
        transform: translateY(-3px);
    }

    .social-btn.ig:hover {
        color: #fff;
        background: #d9a62e;
        border-color: #d9a62e;
    }

    .social-btn.wa:hover {
        color: #fff;
        background: #3fa876;
        border-color: #3fa876;
    }

    .social-btn.tw:hover {
        color: #fff;
        background: #5b3a8e;
        border-color: #5b3a8e;
    }

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    font-size: .82rem;
    color: #b8adcf;
}

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    background: var(--purple-deep);
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
    padding: 13px 26px;
    border-radius: 999px;
    box-shadow: var(--shadow-md);
    transition: transform .35s ease;
    z-index: 100;
}

    .toast.show {
        transform: translateX(-50%) translateY(0);
    }

/* ---------- Mobile nav ---------- */
@media (max-width: 760px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        inset: 68px 0 auto 0;
        flex-direction: column;
        gap: 0;
        background: #fff;
        border-bottom: 1px solid var(--line);
        padding: 10px 24px 20px;
        transform: translateY(-8px);
        opacity: 0;
        pointer-events: none;
        transition: transform .25s ease, opacity .25s ease;
        box-shadow: var(--shadow-md);
    }

        .nav-links.open {
            transform: translateY(0);
            opacity: 1;
            pointer-events: auto;
        }

        .nav-links a {
            padding-block: 12px;
            border-bottom: 1px solid var(--line);
        }
}
