:root {
    --maktub-teal: #063440;
    --maktub-ink: #052f3b;
    --maktub-violet: #3a327e;
    --maktub-pink: #ff74ee;
    --maktub-blue: #c9e6ff;
    --maktub-paper: #fffdf7;
    --maktub-cream: #fff6df;
    --maktub-coral: #f46f68;
    --maktub-green: #1f8d6d;
    --maktub-line: rgba(58, 50, 126, 0.22);
    --maktub-shadow: 0 18px 42px rgba(6, 52, 64, 0.13);
}

html {
    scroll-behavior: smooth;
}

body.maktub-notebook-theme {
    background:
        linear-gradient(rgba(255, 253, 247, 0.8), rgba(255, 253, 247, 0.86)),
        url("../img/paper-texture.jpg") center / 720px auto repeat,
        var(--maktub-paper);
    color: var(--maktub-ink);
    font-family: "Nunito Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
}

.maktub-notebook-theme *,
.maktub-notebook-theme *::before,
.maktub-notebook-theme *::after {
    box-sizing: border-box;
}

.maktub-skip-link {
    background: var(--maktub-pink);
    color: var(--maktub-teal);
    font-weight: 900;
    left: 1rem;
    padding: 0.6rem 0.9rem;
    position: fixed;
    top: -100px;
    z-index: 100000;
}

.maktub-skip-link:focus {
    top: 1rem;
}

.maktub-site-header {
    background: var(--maktub-teal);
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 2000;
}

.maktub-header-inner {
    align-items: center;
    display: flex;
    gap: clamp(1rem, 3vw, 2.5rem);
    justify-content: space-between;
    margin: 0 auto;
    max-width: 1320px;
    min-height: 116px;
    padding: 1rem clamp(1rem, 4vw, 2.5rem);
}

.maktub-site-logo {
    align-items: center;
    display: inline-flex;
    max-width: min(320px, 54vw);
}

.maktub-site-logo__img {
    display: block;
    height: auto;
    max-height: 84px;
    width: 100%;
}

.maktub-primary-nav {
    align-items: center;
    display: flex;
    gap: 1rem;
}

.maktub-primary-nav ul {
    align-items: center;
    display: flex;
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.maktub-primary-nav a {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 900;
    text-decoration: none;
}

.maktub-primary-nav a:hover {
    color: var(--maktub-pink);
}

.maktub-nav-button,
.maktub-hero-button {
    background: var(--maktub-pink);
    border: 1px solid var(--maktub-pink);
    border-radius: 7px;
    color: var(--maktub-teal) !important;
    display: inline-flex;
    font-weight: 900;
    justify-content: center;
    min-height: 44px;
    padding: 0.7rem 1rem;
    text-decoration: none;
}

.maktub-avatar-link {
    border: 3px solid #bde2ff;
    border-radius: 999px;
    height: 48px;
    position: relative;
    width: 48px;
}

.maktub-avatar-link::before,
.maktub-avatar-link::after {
    border: 3px solid #bde2ff;
    border-radius: 999px;
    content: "";
    left: 50%;
    position: absolute;
    transform: translateX(-50%);
}

.maktub-avatar-link::before {
    height: 15px;
    top: 9px;
    width: 15px;
}

.maktub-avatar-link::after {
    border-bottom: 0;
    height: 18px;
    top: 26px;
    width: 29px;
}

.maktub-menu-toggle {
    background: transparent;
    border: 0;
    cursor: pointer;
    display: none;
    gap: 6px;
    padding: 0.45rem;
}

.maktub-menu-toggle span:not(.screen-reader-text) {
    background: #fff;
    border-radius: 999px;
    display: block;
    height: 4px;
    width: 44px;
}

.maktub-site-main {
    min-height: 72vh;
}

.maktub-hero {
    background:
        linear-gradient(rgba(201, 230, 255, 0.9), rgba(201, 230, 255, 0.9)),
        url("../img/school-paper.jpg") center / cover no-repeat;
    min-height: clamp(540px, 78vh, 760px);
    overflow: hidden;
    position: relative;
}

.maktub-hero::after {
    border: 2px dashed rgba(255, 116, 238, 0.46);
    border-radius: 48% 52% 43% 57%;
    bottom: 5%;
    content: "";
    height: min(230px, 42vw);
    position: absolute;
    right: -2%;
    transform: rotate(-16deg);
    width: min(300px, 52vw);
}

.maktub-hero-inner {
    align-items: center;
    display: flex;
    margin: 0 auto;
    max-width: 1320px;
    min-height: inherit;
    padding: clamp(3rem, 8vw, 6rem) clamp(1rem, 5vw, 3rem);
}

.maktub-hero-copy {
    max-width: 820px;
    position: relative;
    z-index: 1;
}

.maktub-hero-copy p {
    color: var(--maktub-pink);
    font-family: "Fraunces", Georgia, serif;
    font-size: clamp(3rem, 12vw, 7rem);
    font-weight: 900;
    line-height: 0.9;
    margin: 0 0 2rem;
    text-shadow: 0 2px 0 rgba(6, 52, 64, 0.08);
}

.maktub-hero h1 {
    color: var(--maktub-teal);
    font-family: "Fraunces", Georgia, serif;
    font-size: clamp(2.6rem, 8vw, 6rem);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.02;
    margin: 0;
    max-width: 900px;
}

.maktub-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

.maktub-hero-button {
    font-size: 1rem;
}

.maktub-hero-button--light {
    background: #fff;
    color: var(--maktub-violet) !important;
}

.maktub-page-frame,
.maktub-content-band {
    padding: clamp(1rem, 4vw, 3rem);
}

.maktub-page-frame--app {
    background:
        linear-gradient(rgba(201, 230, 255, 0.58), rgba(255, 253, 247, 0.84)),
        url("../img/school-paper.jpg") top center / 920px auto repeat;
}

.maktub-page-inner,
.maktub-content-inner {
    margin: 0 auto;
    max-width: 1180px;
}

.maktub-page-frame--app .maktub-page-inner {
    max-width: 1380px;
}

.maktub-page-title {
    margin-bottom: 1.5rem;
}

.maktub-page-title p {
    color: var(--maktub-violet);
    font-weight: 900;
    letter-spacing: 0.08em;
    margin: 0 0 0.4rem;
    text-transform: uppercase;
}

.maktub-page-title h1,
.maktub-post-card h1 {
    color: var(--maktub-teal);
    font-family: "Fraunces", Georgia, serif;
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: 0;
    line-height: 1.06;
    margin: 0;
}

.maktub-entry-content {
    font-size: 1.04rem;
}

.maktub-entry-content a {
    color: var(--maktub-violet);
    font-weight: 900;
}

.maktub-post-card {
    background: rgba(255, 253, 247, 0.94);
    border: 1px solid var(--maktub-line);
    border-radius: 8px;
    box-shadow: var(--maktub-shadow);
    margin-bottom: 1rem;
    padding: clamp(1rem, 3vw, 2rem);
}

.maktub-site-footer {
    background: var(--maktub-teal);
    color: #fff;
}

.maktub-footer-inner {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin: 0 auto;
    max-width: 1320px;
    padding: 1.2rem clamp(1rem, 4vw, 2.5rem);
}

.maktub-footer-inner p {
    color: var(--maktub-pink);
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.45rem;
    font-weight: 900;
    margin: 0;
}

.maktub-footer-inner nav {
    display: flex;
    gap: 1rem;
}

.maktub-footer-inner a {
    color: #fff;
    font-weight: 900;
    text-decoration: none;
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

@media (max-width: 820px) {
    .maktub-header-inner {
        min-height: 96px;
    }

    .maktub-menu-toggle {
        display: grid;
    }

    .maktub-primary-nav {
        background: var(--maktub-teal);
        border-top: 1px solid rgba(255, 255, 255, 0.14);
        display: none;
        gap: 0.75rem;
        inset: 96px 0 auto 0;
        padding: 1rem;
        position: absolute;
    }

    .maktub-primary-nav.is-open {
        align-items: stretch;
        display: grid;
    }

    .maktub-primary-nav ul {
        align-items: stretch;
        display: grid;
    }

    .maktub-nav-button {
        width: 100%;
    }

    .maktub-avatar-link {
        justify-self: end;
    }

    .maktub-hero {
        min-height: 640px;
    }

    .maktub-hero-inner {
        align-items: flex-start;
        padding-top: 3rem;
    }

    .maktub-hero-copy p {
        margin-bottom: 4rem;
    }

    .maktub-hero h1 {
        font-size: clamp(2.55rem, 13vw, 4.6rem);
    }

    .maktub-footer-inner {
        align-items: flex-start;
        display: grid;
    }
}

@media (max-width: 520px) {
    .maktub-site-logo {
        max-width: 205px;
    }

    .maktub-menu-toggle span:not(.screen-reader-text) {
        width: 36px;
    }

    .maktub-page-frame,
    .maktub-content-band {
        padding-left: 0;
        padding-right: 0;
    }

    .maktub-page-inner,
    .maktub-content-inner {
        width: 100%;
    }

    .maktub-page-title,
    .maktub-post-card {
        margin-left: 1rem;
        margin-right: 1rem;
    }
}
