/* Design tokens */
:root {
    --paper: #f2f0e9;
    --paper-strong: #e6e2d8;
    --ink: #0b0f0e;
    --muted: #626b67;
    --accent: #0b5d53;
    --accent-dark: #07463f;
    --white: #ffffff;
    --line: rgba(11, 15, 14, 0.16);
    --light-line: rgba(255, 255, 255, 0.22);
    --shell: 1280px;
    --header-height: 72px;
}

/* Base */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
    margin: 0;
    min-width: 320px;
    color: var(--ink);
    background:
        linear-gradient(
            90deg,
            transparent calc(50% - 0.5px),
            rgba(11, 15, 14, 0.035) 50%,
            transparent calc(50% + 0.5px)
        ),
        var(--paper);
    font-family: "IBM Plex Sans Arabic", "Manrope", sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

html[lang="en"] body {
    font-family: "Manrope", sans-serif;
}

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

button,
input,
textarea {
    font: inherit;
}

::selection {
    color: var(--white);
    background: var(--accent);
}

.shell {
    width: min(calc(100% - 48px), var(--shell));
    margin-inline: auto;
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: 12px;
    inset-inline-start: 12px;
    padding: 11px 15px;
    color: var(--white);
    background: var(--ink);
    transform: translateY(-150%);
    transition: transform 140ms ease;
}

.skip-link:focus {
    transform: translateY(0);
}

.material-symbols-rounded {
    font-size: 20px;
    font-variation-settings:
        "FILL" 0,
        "wght" 400,
        "GRAD" 0,
        "opsz" 24;
}

/* Header */
.site-header {
    position: sticky;
    z-index: 40;
    top: 0;
    height: var(--header-height);
    border-bottom: 1px solid transparent;
    background: color-mix(in srgb, var(--paper) 86%, transparent);
    backdrop-filter: blur(18px);
    transition:
        height 180ms ease,
        border-color 180ms ease;
}

.site-header.is-compact {
    height: 62px;
    border-color: var(--line);
}

.nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    height: 100%;
    align-items: center;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 13px;
}

.brand__identity {
    display: block;
    line-height: 1;
}

.brand__identity strong {
    font-size: 14px;
    font-weight: 700;
}

.nav__links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

.nav__links a {
    position: relative;
    transition: color 150ms ease;
}

.nav__links a::after {
    position: absolute;
    right: 0;
    bottom: -8px;
    width: 0;
    height: 2px;
    content: "";
    background: var(--accent);
    transition: width 180ms ease;
}

html[dir="ltr"] .nav__links a::after {
    right: auto;
    left: 0;
}

.nav__links a:hover,
.nav__links a:focus-visible {
    color: var(--ink);
}

.nav__links a:hover::after,
.nav__links a:focus-visible::after {
    width: 100%;
}

.nav__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    justify-self: end;
    gap: 10px;
}

.language-switch,
.contact-button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
}

.language-switch {
    padding: 0 14px;
    color: var(--ink);
    border: 1px solid var(--line);
    background: transparent;
    cursor: pointer;
    font-family: "Manrope", sans-serif;
    font-size: 12px;
    font-weight: 800;
}

.contact-button {
    padding: 0 18px;
    color: var(--white);
    background: var(--ink);
    font-size: 13px;
    font-weight: 700;
    transition:
        background 160ms ease,
        transform 160ms ease;
}

.contact-button:hover,
.contact-button:focus-visible {
    background: var(--accent);
    transform: translateY(-2px);
}

/* Hero */
.hero {
    padding: clamp(56px, 6vw, 88px) 0 clamp(60px, 7vw, 96px);
}

.hero__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.42fr) minmax(300px, 0.58fr);
    align-items: end;
    gap: clamp(48px, 7vw, 92px);
}

.hero__content {
    min-width: 0;
}

.role-label {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    color: var(--muted);
    font-family: "Manrope", "IBM Plex Sans Arabic", sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.role-label__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

.role-label__separator {
    color: var(--line);
}

.hero__title {
    max-width: 1040px;
    margin: 0;
    font-size: clamp(54px, 7.25vw, 112px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.056em;
}

html[lang="ar"] .hero__title {
    line-height: 1.13;
    letter-spacing: -0.036em;
}

.hero__title span {
    display: block;
}

.hero__title span + span {
    margin-top: 0.08em;
}

.hero__title-accent {
    color: var(--accent);
}

.hero__footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 42px;
    margin-top: 30px;
}

.hero__intro {
    max-width: 730px;
    margin: 0;
    color: var(--muted);
    font-size: clamp(18px, 1.8vw, 23px);
    line-height: 1.75;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.button {
    display: inline-flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 21px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 750;
    transition:
        color 160ms ease,
        background 160ms ease,
        border-color 160ms ease,
        transform 160ms ease;
}

.button:hover,
.button:focus-visible {
    transform: translateY(-3px);
}

.button--primary {
    color: var(--white);
    background: var(--accent);
}

.button--primary:hover,
.button--primary:focus-visible {
    background: var(--accent-dark);
}

.button--secondary {
    border-color: var(--line);
}

.button--secondary:hover,
.button--secondary:focus-visible {
    color: var(--white);
    border-color: var(--ink);
    background: var(--ink);
}

.hero__facts {
    border-top: 1px solid var(--line);
}

.hero__motto {
    padding: 28px 0 32px;
    border-bottom: 1px solid var(--line);
}

.hero__motto-index {
    display: block;
    margin-bottom: 24px;
    color: var(--accent);
    font-family: "Manrope", sans-serif;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.hero__motto blockquote {
    margin: 0;
    font-size: clamp(24px, 2.55vw, 38px);
    font-weight: 650;
    line-height: 1.4;
    letter-spacing: -0.028em;
}

.facts {
    margin: 0;
}

.fact {
    display: grid;
    grid-template-columns: 95px minmax(0, 1fr);
    gap: 18px;
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
}

.fact dt {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.fact dd {
    margin: 0;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.55;
}

/* Position statement */
.position {
    color: var(--white);
    background: var(--ink);
}

.position__layout {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 48px;
    padding-block: clamp(60px, 7vw, 92px);
}

.section-code {
    color: var(--accent);
    font-family: "Manrope", sans-serif;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.section-code--light {
    color: #a8d8cf;
}

.position__statement {
    max-width: 1000px;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(30px, 4.1vw, 57px);
    font-weight: 560;
    line-height: 1.4;
    letter-spacing: -0.035em;
}

/* Shared sections */
.section {
    padding: clamp(72px, 9vw, 120px) 0;
}

.section-header {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    align-items: end;
    gap: 72px;
    margin-bottom: 44px;
}

.section-header h2,
.profile__heading h2 {
    max-width: 850px;
    margin: 17px 0 0;
    font-size: clamp(43px, 6vw, 82px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.052em;
}

html[lang="ar"] .section-header h2,
html[lang="ar"] .profile__heading h2 {
    letter-spacing: -0.034em;
}

.section-header > p {
    max-width: 560px;
    margin: 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.85;
}

/* Selected work */
.work-list {
    border-top: 1px solid var(--line);
}

.work-item {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: 108px minmax(280px, 0.82fr) minmax(0, 1.18fr) 58px;
    align-items: center;
    gap: 34px;
    overflow: hidden;
    margin-inline: -24px;
    padding: 34px 24px;
    border-bottom: 1px solid var(--line);
    transition:
        color 320ms ease,
        border-color 320ms ease;
}

.work-item::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    content: "";
    background: var(--ink);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 430ms cubic-bezier(0.22, 1, 0.36, 1);
}

html[dir="rtl"] .work-item::before {
    transform-origin: right center;
}

.work-item:hover {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.16);
}

.work-item:hover::before {
    transform: scaleX(1);
}

.work-item > * {
    position: relative;
    z-index: 1;
}

.work-item__number {
    color: var(--accent);
    font-family: "Manrope", sans-serif;
    font-size: clamp(40px, 4.3vw, 66px);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.075em;
    transition: color 320ms ease;
}

.work-item:hover .work-item__number {
    color: var(--white);
}

.work-item__meta {
    display: block;
    margin-bottom: 11px;
    color: var(--accent);
    font-family: "Manrope", "IBM Plex Sans Arabic", sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    transition: color 320ms ease;
}

.work-item h3 {
    margin: 0;
    font-size: clamp(25px, 2.7vw, 39px);
    font-weight: 680;
    line-height: 1.22;
    letter-spacing: -0.032em;
}

.work-item p {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.85;
    transition: color 320ms ease;
}

.work-item:hover .work-item__meta,
.work-item:hover p {
    color: rgba(255, 255, 255, 0.72);
}

.work-item__icon {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: 24px;
    transform: none;
    transition:
        color 320ms ease,
        border-color 320ms ease,
        background-color 320ms ease;
}

.work-item:hover .work-item__icon {
    color: var(--white);
    background: rgba(255, 255, 255, 0.06);
    transform: none;
}

/* Profile */
.profile {
    color: var(--white);
    background: var(--accent);
}

.profile__layout {
    display: grid;
    grid-template-columns: minmax(320px, 0.78fr) minmax(0, 1.22fr);
    gap: clamp(72px, 10vw, 150px);
}

.profile__heading {
    align-self: start;
}

.profile__content {
    max-width: 780px;
}

.profile__lead {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(24px, 3.1vw, 39px);
    font-weight: 500;
    line-height: 1.55;
    letter-spacing: -0.026em;
}

.profile__groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 48px;
    margin-top: 44px;
    padding-top: 34px;
    border-top: 1px solid var(--light-line);
}

.profile__group h3 {
    margin: 0 0 20px;
    color: #bfe1db;
    font-size: 13px;
    font-weight: 700;
}

.plain-list {
    display: grid;
    gap: 13px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.plain-list li {
    position: relative;
    padding-inline-start: 19px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 15px;
    line-height: 1.6;
}

.plain-list li::before {
    position: absolute;
    top: 0.72em;
    inset-inline-start: 0;
    width: 5px;
    height: 5px;
    content: "";
    border-radius: 50%;
    background: #bfe1db;
}

/* Approach */
.approach-list {
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--line);
    list-style: none;
}

.approach-item {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) 56px;
    align-items: center;
    gap: 30px;
    padding: 32px 0;
    border-bottom: 1px solid var(--line);
}

.approach-item__number {
    color: var(--accent);
    font-family: "Manrope", sans-serif;
    font-size: 14px;
    font-weight: 800;
}

.approach-item h3 {
    margin: 0 0 7px;
    font-size: clamp(23px, 2.55vw, 35px);
    font-weight: 680;
    letter-spacing: -0.026em;
}

.approach-item p {
    max-width: 780px;
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.75;
}

.approach-item__icon {
    display: grid;
    width: 50px;
    height: 50px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    font-size: 23px;
}

/* Contact and footer */
.contact {
    padding: 0;
    color: var(--white);
    background: var(--ink);
}

.contact__panel {
    padding: clamp(54px, 6vw, 78px) 0 0;
    color: var(--white);
    background: transparent;
}

.contact__label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 13px;
    font-weight: 700;
}

.contact h2 {
    max-width: 980px;
    margin: 22px 0 30px;
    font-size: clamp(42px, 5.8vw, 76px);
    font-weight: 680;
    line-height: 1.08;
    letter-spacing: -0.048em;
}

html[lang="ar"] .contact h2 {
    line-height: 1.16;
    letter-spacing: -0.03em;
}

.contact__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.button--outline-light {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.42);
}

.button--outline-light:hover,
.button--outline-light:focus-visible {
    color: var(--ink);
    background: var(--white);
}

.footer {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    margin-top: 40px;
    padding: 20px 0 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
}

.footer__domain {
    font-family: "Manrope", sans-serif;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.footer a {
    display: inline-flex;
    align-items: center;
    justify-self: end;
    gap: 7px;
    transition: color 150ms ease;
}

.footer a:hover,
.footer a:focus-visible {
    color: var(--white);
}

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition:
        opacity 600ms ease,
        transform 600ms ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent) 65%, white);
    outline-offset: 4px;
}

/* Responsive */
@media (max-width: 1080px) {
    .nav__links {
        display: none;
    }

    .hero__layout,
    .profile__layout {
        grid-template-columns: 1fr;
    }

    .hero__facts {
        display: grid;
        grid-template-columns: minmax(250px, 0.7fr) minmax(0, 1.3fr);
        gap: 30px;
        border-top: 0;
    }

    .hero__motto {
        padding: 30px;
        border: 1px solid var(--line);
        background: var(--paper-strong);
    }

    .facts {
        border-top: 1px solid var(--line);
    }

    .hero__footer {
        grid-template-columns: 1fr;
    }

    .hero__actions {
        justify-content: flex-start;
    }

    .profile__content {
        max-width: none;
    }
}

@media (max-width: 840px) {
    :root {
        --header-height: 66px;
    }

    .shell {
        width: min(calc(100% - 28px), var(--shell));
    }

    .nav {
        grid-template-columns: 1fr auto;
    }

    .brand__identity {
        display: none;
    }

    .hero {
        padding-top: 44px;
    }

    .hero__title {
        font-size: clamp(48px, 14.5vw, 78px);
        line-height: 1.1;
    }

    html[lang="ar"] .hero__title {
        line-height: 1.17;
    }

    .hero__facts {
        grid-template-columns: 1fr;
    }

    .position__layout,
    .section-header {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .work-item {
        grid-template-columns: 72px minmax(0, 1fr) 48px;
        gap: 18px;
        margin-inline: -18px;
        padding: 30px 18px;
    }

    .work-item p {
        grid-column: 2 / -1;
    }

    .work-item__icon {
        width: 46px;
        height: 46px;
    }

    .profile__groups {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 580px) {
    .language-switch {
        width: 44px;
        padding: 0;
    }

    .language-switch .material-symbols-rounded {
        display: none;
    }

    .contact-button {
        width: 44px;
        padding: 0;
    }

    .contact-button span:first-child {
        display: none;
    }

    .hero__title {
        font-size: clamp(48px, 16.5vw, 73px);
    }

    .hero__actions .button,
    .contact__actions .button {
        width: 100%;
    }

    .hero__motto {
        padding: 24px;
    }

    .work-item {
        grid-template-columns: 56px minmax(0, 1fr);
        margin-inline: -12px;
        padding-inline: 12px;
    }

    .work-item p {
        grid-column: 2;
    }

    .work-item__icon {
        display: none;
    }

    .approach-item {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .approach-item__icon {
        display: none;
    }

    .contact__panel {
        padding-top: 48px;
    }

    .contact h2 {
        font-size: clamp(38px, 11.5vw, 56px);
    }

    .footer {
        grid-template-columns: 1fr;
        align-items: start;
        margin-top: 40px;
    }

    .footer a {
        justify-self: start;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
