:root {
    --bg: #f5f7fb;
    --surface: rgba(255, 255, 255, 0.88);
    --surface-strong: #ffffff;
    --surface-muted: #eef7f6;
    --surface-dark: #0f172a;
    --text: #0f172a;
    --muted: #56657f;
    --line: rgba(15, 23, 42, 0.1);
    --brand: #0f766e;
    --brand-deep: #114b5f;
    --accent: #f97316;
    --accent-soft: rgba(249, 115, 22, 0.12);
    --success: #15803d;
    --error: #b91c1c;
    --shadow: 0 24px 80px rgba(15, 23, 42, 0.14);
    --shadow-soft: 0 16px 50px rgba(15, 23, 42, 0.08);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 14px;
}

html,
body {
    min-height: 100%;
}

body {
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, 0.14), transparent 34%),
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.16), transparent 28%),
        linear-gradient(180deg, #fbfcff 0%, #f4f6fb 100%);
    color: var(--text);
    line-height: 1.75;
    font-family: 'Manrope', sans-serif;
    overflow-x: hidden;
}

html[lang="ar"] body {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0 0 14px;
    color: var(--text);
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    line-height: 1.15;
}

html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4,
html[lang="ar"] h5,
html[lang="ar"] h6 {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
}

p {
    margin: 0;
    color: var(--muted);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

.portfolio-main {
    position: relative;
}

.home-screen > * {
    position: relative;
    z-index: 1;
}

.site-header {
    position: relative;
    z-index: 1000;
}

.site-navbar {
    margin: 0;
    border: 0;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(16px);
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
}

.site-navbar__inner {
    display: flex;
    align-items: center;
    min-height: 88px;
    gap: 18px;
}

.site-brand {
    flex: 1 1 auto;
}

.site-brand a {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
}

.site-brand__name {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text);
}

.site-brand__tagline {
    max-width: 360px;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

.site-navbar__toggle {
    margin: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-strong);
}

.site-navbar__toggle .icon-bar {
    background: var(--text);
}

.site-nav > li > a {
    padding: 12px 14px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 700;
    font-size: 0.95rem;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.site-nav > li > a:hover,
.site-nav > li > a:focus {
    background: rgba(15, 118, 110, 0.1);
    color: var(--brand);
    transform: translateY(-1px);
}

.site-lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
}

.site-lang-switch a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 94px;
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 700;
    transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.site-lang-switch a.is-active {
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(15, 118, 110, 0.24);
}

.hero-section {
    padding: 156px 0 100px;
}

.hero-panel {
    position: relative;
    overflow: hidden;
    padding: 26px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.62));
    box-shadow: var(--shadow);
}

.hero-panel::before {
    position: absolute;
    top: -120px;
    right: -60px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.22), transparent 68%);
    content: "";
    pointer-events: none;
}

.hero-copy,
.hero-visual,
.section-panel,
.service-card,
.project-card,
.stat-card,
.quote-card,
.blog-card,
.contact-form-card,
.contact-card,
.article-card,
.article-shell,
.sidebar-card,
.empty-state {
    animation: rise-in 0.75s ease both;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100%;
    gap: 18px;
    padding: 18px 12px 18px 6px;
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.1);
    color: var(--brand);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

html[lang="ar"] .section-kicker {
    letter-spacing: 0;
    text-transform: none;
}

.hero-copy h1 {
    max-width: 10ch;
    font-size: clamp(2.7rem, 5vw, 4.6rem);
}

.hero-copy h1 span {
    display: inline-block;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-lead {
    max-width: 620px;
    font-size: 1.08rem;
    line-height: 1.9;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-badges span,
.skill-pill,
.project-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 15px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    color: var(--text);
    font-weight: 700;
    font-size: 0.92rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 8px;
}

.btn-primary-modern,
.btn-secondary-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 14px 22px;
    border-radius: 16px;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

.btn-primary-modern {
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
    color: #ffffff;
    box-shadow: 0 18px 30px rgba(15, 118, 110, 0.24);
}

.btn-secondary-modern {
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.86);
    color: var(--text);
}

.btn-primary-modern:hover,
.btn-secondary-modern:hover {
    transform: translateY(-2px);
}

.hero-visual {
    position: relative;
    min-height: 460px;
    border-radius: 28px;
    background-position: center;
    background-size: cover;
    overflow: hidden;
}

.hero-visual::before {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.72));
    content: "";
}

.hero-visual__content {
    position: absolute;
    right: 26px;
    bottom: 26px;
    left: 26px;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(12px);
    color: #ffffff;
}

.hero-visual__content h3,
.hero-visual__content p,
.hero-visual__label {
    color: #ffffff;
}

.hero-visual__label {
    display: inline-flex;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.82rem;
    font-weight: 700;
}

.section-block {
    padding: 84px 0;
}

.section-muted {
    background: rgba(255, 255, 255, 0.4);
}

.section-panel {
    padding: 36px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.64));
    box-shadow: var(--shadow-soft);
}

.section-copy {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.section-copy h2,
.section-heading h2,
.contact-intro h2,
.page-hero__content h1 {
    font-size: clamp(2rem, 4vw, 3rem);
}

.section-heading {
    margin-bottom: 28px;
}

.section-heading--center {
    max-width: 760px;
    margin-right: auto;
    margin-bottom: 42px;
    margin-left: auto;
    text-align: center;
}

.section-heading--center .section-kicker {
    margin-right: auto;
    margin-left: auto;
}

.section-heading--split {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
}

.skills-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-content: flex-start;
    min-height: 100%;
    padding-top: 10px;
}

.skill-pill {
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.service-card,
.project-card,
.quote-card,
.blog-card,
.contact-card,
.article-card,
.sidebar-card,
.empty-state,
.article-shell {
    height: 100%;
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow-soft);
}

.service-card,
.project-card,
.quote-card,
.blog-card,
.contact-card,
.article-card {
    margin-bottom: 24px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover,
.project-card:hover,
.quote-card:hover,
.blog-card:hover,
.contact-card:hover,
.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 26px 48px rgba(15, 23, 42, 0.12);
}

.service-card__icon,
.contact-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 66px;
    height: 66px;
    margin-bottom: 18px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(17, 75, 95, 0.18));
    color: var(--brand);
    font-size: 1.45rem;
}

.service-card h3,
.project-card h3,
.quote-card__meta strong,
.blog-card h3,
.contact-card h3,
.article-card h2 {
    font-size: 1.35rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.project-tag.is-active {
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
    border-color: transparent;
    color: #ffffff;
}

.project-card {
    overflow: hidden;
    padding: 0;
}

.project-card__media img,
.blog-card__media img,
.article-card__media img,
.article-shell__media img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.project-card__body,
.blog-card__body,
.article-card__body {
    padding: 24px;
}

.project-card__category,
.blog-card__meta,
.article-card__meta,
.article-shell__meta {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 700;
}

.project-card__body p strong {
    color: var(--text);
}

.stats-section {
    padding-bottom: 12px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 26px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-soft);
}

.stat-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 1.25rem;
}

.stat-card strong {
    font-size: 2.3rem;
    line-height: 1;
}

.stat-card span {
    color: var(--muted);
    font-weight: 700;
}

.quote-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.quote-card p {
    font-size: 1rem;
    line-height: 1.9;
}

.quote-card__meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.quote-card__meta span {
    color: var(--muted);
    font-size: 0.92rem;
}

.blog-card {
    overflow: hidden;
    padding: 0;
}

.blog-card__body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--brand);
    font-weight: 800;
}

.text-link::after {
    content: "\2192";
}

html[dir="rtl"] .text-link::after {
    content: "\2190";
}

.text-link--muted {
    color: var(--muted);
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: 28px;
    margin-bottom: 28px;
}

.contact-intro,
.contact-form-card {
    padding: 32px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-soft);
}

.contact-intro {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.contact-highlights {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 12px;
}

.contact-highlight {
    padding: 18px 20px;
    border-radius: 20px;
    background: var(--surface-muted);
}

.contact-highlight strong {
    display: block;
    margin-bottom: 6px;
    color: var(--text);
    font-size: 1rem;
}

.form-status {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 16px;
    font-weight: 700;
}

.form-status.is-success {
    background: rgba(21, 128, 61, 0.08);
    color: var(--success);
}

.form-status.is-error {
    background: rgba(185, 28, 28, 0.08);
    color: var(--error);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group--full {
    grid-column: 1 / -1;
}

.form-group label {
    color: var(--text);
    font-weight: 700;
}

.form-control {
    min-height: 52px;
    padding: 14px 16px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: none;
    color: var(--text);
}

.form-control:focus {
    border-color: rgba(15, 118, 110, 0.45);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.08);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.contact-card-grid {
    margin-top: 6px;
}

.contact-card {
    text-align: left;
}

html[dir="rtl"] .contact-card {
    text-align: right;
}

.site-footer {
    padding: 34px 0 44px;
    background: var(--surface-dark);
}

.site-footer__inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer__brand h3,
.site-footer__brand p,
.site-footer__brand span,
.site-footer__meta p {
    color: rgba(255, 255, 255, 0.88);
}

.site-footer__brand h3 {
    margin-bottom: 8px;
    font-size: 1.35rem;
}

.site-footer__brand {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 560px;
}

.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transition: background-color 0.25s ease, transform 0.25s ease;
}

.footer-social a:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-2px);
}

.site-footer__meta {
    padding-top: 20px;
}

.page-hero {
    position: relative;
    padding: 160px 0 88px;
    background-position: center;
    background-size: cover;
    overflow: hidden;
}

.page-hero__content {
    position: relative;
    z-index: 1;
    max-width: 760px;
    color: #ffffff;
}

.page-hero__content h1,
.page-hero__content .section-kicker,
.breadcrumb-bar,
.breadcrumb-bar a {
    color: #ffffff;
}

.page-hero__content .section-kicker {
    background: rgba(255, 255, 255, 0.12);
}

.breadcrumb-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
    font-weight: 700;
}

.article-card,
.article-shell {
    padding: 0;
    overflow: hidden;
}

.article-card__body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.article-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.article-shell__meta,
.article-shell__content,
.article-shell > .text-link {
    padding-right: 28px;
    padding-left: 28px;
}

.article-shell__meta {
    padding-top: 24px;
}

.article-shell__content {
    padding-top: 18px;
    padding-bottom: 22px;
}

.article-shell__content p,
.article-shell__content ul,
.article-shell__content ol,
.article-shell__content h2,
.article-shell__content h3,
.article-shell__content blockquote {
    margin-bottom: 16px;
}

.article-shell__content ul,
.article-shell__content ol {
    padding-inline-start: 22px;
    color: var(--muted);
}

.article-shell > .text-link {
    padding-bottom: 28px;
}

.sidebar-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-card h3 {
    margin-bottom: 18px;
    font-size: 1.25rem;
}

.sidebar-search {
    display: flex;
    gap: 10px;
}

.sidebar-search input[type="search"] {
    flex: 1 1 auto;
    min-height: 50px;
    padding: 0 16px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 16px;
    background: #ffffff;
}

.sidebar-search button {
    min-width: 96px;
    min-height: 50px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
    color: #ffffff;
    font-weight: 800;
}

.sidebar-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sidebar-list li + li {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.sidebar-list a {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--text);
    font-weight: 700;
}

.sidebar-list span {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 700;
}

.empty-state {
    padding: 34px;
    text-align: center;
}

.pagination-modern {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.pagination-modern__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    height: 46px;
    padding: 0 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: var(--text);
    font-weight: 800;
}

.pagination-modern__link.is-active {
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
    border-color: transparent;
    color: #ffffff;
}

html[dir="rtl"] body {
    text-align: right;
}

html[dir="rtl"] .site-navbar__collapse {
    text-align: right;
}

html[dir="rtl"] .site-brand a {
    align-items: flex-start;
}

html[dir="rtl"] .project-card__body p strong,
html[dir="rtl"] .contact-highlight strong {
    margin-left: 6px;
}

html[dir="rtl"] .sidebar-search {
    flex-direction: row;
}

html[dir="rtl"] .breadcrumb-bar,
html[dir="rtl"] .article-card__actions,
html[dir="rtl"] .hero-actions,
html[dir="rtl"] .hero-badges,
html[dir="rtl"] .project-tags,
html[dir="rtl"] .site-lang-switch {
    justify-content: flex-start;
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 768px) {
    .site-navbar__collapse.collapse {
        display: flex !important;
        align-items: center;
        justify-content: flex-end;
        gap: 18px;
    }

    .site-nav {
        display: flex;
        align-items: center;
        gap: 4px;
        margin: 0 auto 0 0;
        float: none;
    }

    html[dir="rtl"] .site-nav {
        margin: 0 0 0 auto;
    }

    .site-nav > li {
        float: none;
    }
}

@media (max-width: 991px) {
    .hero-copy h1 {
        max-width: none;
    }

    .hero-visual {
        min-height: 360px;
        margin-top: 18px;
    }

    .contact-layout,
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 767px) {
    .site-navbar {
        padding: 12px 0;
    }

    .site-navbar__inner {
        flex-wrap: wrap;
        min-height: 0;
    }

    .site-brand {
        max-width: calc(100% - 64px);
    }

    .site-navbar__collapse {
        width: 100%;
        margin-top: 12px;
        padding: 18px;
        border: 1px solid rgba(15, 23, 42, 0.08);
        border-radius: 22px;
        background: rgba(255, 255, 255, 0.96);
        box-shadow: var(--shadow-soft);
    }

    .site-nav {
        margin: 0;
        float: none;
    }

    .site-nav > li {
        float: none;
    }

    .site-nav > li + li {
        margin-top: 6px;
    }

    .site-lang-switch {
        margin-top: 16px;
    }

    .hero-section,
    .page-hero {
        padding-top: 136px;
    }

    .hero-panel,
    .section-panel,
    .contact-intro,
    .contact-form-card,
    .service-card,
    .project-card,
    .quote-card,
    .blog-card,
    .contact-card,
    .article-card,
    .sidebar-card,
    .empty-state,
    .article-shell {
        border-radius: 24px;
    }

    .section-block {
        padding: 72px 0;
    }

    .section-heading--split,
    .site-footer__inner,
    .contact-layout {
        flex-direction: column;
        display: flex;
    }

    .stats-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .article-shell__meta,
    .article-shell__content,
    .article-shell > .text-link {
        padding-right: 22px;
        padding-left: 22px;
    }

    .sidebar-search {
        flex-direction: column;
    }

    .sidebar-search button {
        width: 100%;
    }
}
