:root {
    --paper: #f7f2ea;
    --paper-soft: #fffaf2;
    --ink: #171413;
    --ink-soft: #463f3a;
    --muted: #746b64;
    --quiet: #aaa097;
    --line: #ddd2c5;
    --red: #8f2f28;
    --green: #1f5b4a;
    --blue: #253f67;
    --gold: #b8872d;
    --shadow: 0 18px 60px rgba(36, 27, 19, 0.08);
    --content-width: 760px;
    --wide-width: 980px;
    --text-primary: var(--ink);
    --text-muted: var(--muted);
    --text-light: var(--quiet);
    --accent-gold: var(--red);
    --border-light: var(--line);
}

* {
    box-sizing: border-box;
}

html {
    direction: rtl;
    background: var(--paper);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background:
        linear-gradient(90deg, rgba(143, 47, 40, 0.06) 0 1px, transparent 1px 100%),
        linear-gradient(180deg, #fbf7ef 0%, var(--paper) 48%, #f0e9dc 100%);
    background-size: 88px 100%, 100% 100%;
    display: flex;
    flex-direction: column;
    font-family: "Amiri", serif;
    font-size: 20px;
    line-height: 1.95;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(rgba(23, 20, 19, 0.08) 0.7px, transparent 0.7px);
    background-size: 18px 18px;
    opacity: 0.16;
    mix-blend-mode: multiply;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

a:hover {
    color: var(--red);
}

img {
    max-width: 100%;
}

.container {
    width: 100%;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 24px;
}

.header {
    padding: 30px 24px 18px;
}

.header__inner {
    width: min(var(--wide-width), 100%);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(116, 107, 100, 0.26);
}

.header__brand {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    min-width: 0;
}

.header__logo-mark {
    width: 46px;
    height: 46px;
    border: 1px solid var(--ink);
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    background: var(--ink);
    color: var(--paper-soft);
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 5px 5px 0 var(--red);
}

.header__title,
.header__tagline {
    display: block;
}

.header__title {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.1;
}

.header__tagline {
    margin-top: 3px;
    color: var(--muted);
    font-family: "Noto Sans Arabic", sans-serif;
    font-size: 12px;
    line-height: 1.5;
}

.header__nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    font-family: "Noto Sans Arabic", sans-serif;
}

.header__nav a {
    min-height: 36px;
    padding: 7px 12px;
    border: 1px solid transparent;
    color: var(--ink-soft);
    font-size: 13px;
    line-height: 1.4;
}

.header__nav a:hover,
.header__nav a.active {
    border-color: var(--ink);
    color: var(--ink);
    background: rgba(255, 250, 242, 0.72);
}

main {
    flex: 1;
    padding: 52px 0 42px;
}

.home-intro {
    margin: 10px 0 42px;
}

.home-intro__eyebrow,
.section-heading p,
.page-heading p,
.featured-post__meta,
.post__date,
.archive__item-date,
.posts-list__date,
.gallery-list__item-date,
.gallery-post__date {
    font-family: "Noto Sans Arabic", sans-serif;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--red);
}

.home-intro__eyebrow,
.section-heading p,
.page-heading p {
    margin: 0 0 10px;
}

.home-intro__title {
    max-width: 680px;
    margin: 0;
    color: var(--ink);
    font-size: 56px;
    font-weight: 700;
    line-height: 1.25;
}

.home-intro__text {
    max-width: 520px;
    margin: 20px 0 0;
    color: var(--muted);
    font-size: 22px;
}

.featured-post {
    position: relative;
    margin: 0 0 54px;
    padding: 30px 0 34px;
    border-top: 2px solid var(--ink);
    border-bottom: 1px solid var(--line);
}

.featured-post__meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    color: var(--green);
}

.featured-post__title,
.post__title,
.page-heading h1,
.section-heading h2,
.gallery-post__title {
    margin: 0;
    color: var(--ink);
    font-weight: 700;
    line-height: 1.28;
}

.featured-post__title {
    font-size: 38px;
}

.featured-post__summary {
    margin: 16px 0 0;
    color: var(--ink-soft);
    font-size: 22px;
}

.text-link {
    display: inline-block;
    margin-top: 20px;
    border-bottom: 1px solid currentColor;
    color: var(--red);
    font-family: "Noto Sans Arabic", sans-serif;
    font-size: 14px;
    font-weight: 700;
}

.section-heading,
.page-heading {
    margin-bottom: 24px;
}

.section-heading h2,
.page-heading h1 {
    font-size: 34px;
}

.archive {
    margin: 46px 0 0;
}

.archive__list,
.posts-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.archive__item,
.posts-list__item {
    display: grid;
    grid-template-columns: minmax(90px, max-content) 1fr;
    gap: 22px;
    align-items: baseline;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}

.archive__item-title,
.posts-list__title {
    color: var(--ink);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.45;
}

.archive__item-title:hover,
.posts-list__title:hover {
    color: var(--red);
}

.photo-strip {
    margin-top: 54px;
    padding-top: 36px;
    border-top: 1px solid var(--line);
}

.photo-strip__grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    grid-auto-rows: 135px;
    gap: 10px;
}

.photo-strip__grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: saturate(0.88) contrast(1.02);
}

.photo-strip__grid img:first-child {
    grid-row: span 2;
}

.post,
.gallery-post {
    margin-bottom: 48px;
}

.post__header {
    margin-bottom: 34px;
    padding-bottom: 22px;
    border-bottom: 2px solid var(--ink);
}

.post__date,
.gallery-post__date {
    display: block;
    margin-bottom: 12px;
    color: var(--green);
}

.post__title,
.gallery-post__title {
    font-size: 46px;
}

.post__content,
.gallery-post__content {
    text-align: right;
}

.post__content p,
.gallery-post__content p {
    margin: 0 0 1.55em;
}

.post__content p:first-child::first-letter {
    color: var(--red);
    font-size: 2.8em;
    font-weight: 700;
    line-height: 0.9;
}

.post__nav,
.gallery-post__nav {
    margin-top: 52px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 18px;
    font-family: "Noto Sans Arabic", sans-serif;
}

.post__nav a,
.gallery-post__nav a {
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

.gallery-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.gallery-list__item {
    position: relative;
    min-height: 260px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--line);
    box-shadow: var(--shadow);
}

.gallery-list__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease, filter 0.35s ease;
}

.gallery-list__item:hover img {
    transform: scale(1.04);
    filter: saturate(0.85);
}

.gallery-list__overlay {
    position: absolute;
    inset: auto 0 0;
    padding: 44px 18px 18px;
    color: #fffaf2;
    text-align: right;
    background: linear-gradient(180deg, transparent, rgba(12, 12, 12, 0.76));
}

.gallery-list__item-title {
    margin: 0 0 4px;
    font-size: 22px;
    line-height: 1.35;
}

.inline-gallery,
.gallery-masonry {
    column-count: 3;
    column-gap: 14px;
    margin: 34px 0;
}

.inline-gallery__item,
.gallery-masonry__item {
    break-inside: avoid;
    margin-bottom: 14px;
    cursor: pointer;
    overflow: hidden;
    border-radius: 0;
    position: relative;
    background: var(--line);
}

.inline-gallery__item img,
.gallery-masonry__item img {
    width: 100%;
    height: auto;
    display: block;
}

.lightbox {
    backdrop-filter: blur(6px);
}

.footer {
    padding: 30px 24px 42px;
}

.footer__inner {
    width: min(var(--wide-width), 100%);
    margin: 0 auto;
    padding-top: 22px;
    border-top: 1px solid rgba(116, 107, 100, 0.26);
}

.footer__quote {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 17px;
    text-align: center;
}

.footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 18px;
    color: var(--quiet);
    font-family: "Noto Sans Arabic", sans-serif;
    font-size: 12px;
    line-height: 1.7;
}

.footer__bottom a:hover {
    color: var(--red);
}

@media (max-width: 760px) {
    body {
        font-size: 18px;
        line-height: 1.9;
    }

    .header {
        padding: 20px 16px 10px;
    }

    .header__inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
    }

    .header__brand {
        gap: 16px;
    }

    .header__logo-mark {
        width: 42px;
        height: 42px;
        font-size: 25px;
    }

    .header__nav {
        justify-content: flex-start;
        width: 100%;
    }

    .container {
        padding: 0 18px;
    }

    main {
        padding: 34px 0;
    }

    .home-intro__title {
        font-size: 38px;
    }

    .home-intro__text,
    .featured-post__summary {
        font-size: 19px;
    }

    .featured-post__title {
        font-size: 31px;
    }

    .post__title,
    .gallery-post__title {
        font-size: 36px;
    }

    .archive__item,
    .posts-list__item {
        grid-template-columns: 1fr;
        gap: 5px;
        padding: 16px 0;
    }

    .photo-strip__grid,
    .gallery-list {
        grid-template-columns: 1fr;
    }

    .photo-strip__grid {
        grid-auto-rows: 150px;
    }

    .photo-strip__grid img:first-child {
        grid-row: span 1;
    }

    .inline-gallery,
    .gallery-masonry {
        column-count: 2;
        column-gap: 8px;
    }

    .inline-gallery__item,
    .gallery-masonry__item {
        margin-bottom: 8px;
    }
}

@media (max-width: 430px) {
    .container {
        padding: 0 14px;
    }

    .header__title {
        font-size: 26px;
    }

    .home-intro__title {
        font-size: 32px;
    }

    .post__title,
    .gallery-post__title {
        font-size: 31px;
    }

    .section-heading h2,
    .page-heading h1 {
        font-size: 28px;
    }
}
