@font-face {
    font-family: "Rethink Sans";
    src: url("./rethink-sans-variable.ttf") format("truetype");
    font-display: swap;
    font-style: normal;
}

@media (prefers-color-scheme: dark) {
    :root {
        --color-rgb-1: 255, 255, 255; /* white */
        --color-rgb-2: 21, 0, 42; /* dark purple */
        --color-rgb-3: 234, 244, 94; /* anis */
        --color-rgb-4: 88, 3, 67; /* plum */
        --color-rgb-5: 208, 0, 200; /* magenta */
        --color-rgb-6: 0, 0, 0; /* black */
        --color-1: rgb(var(--color-rgb-1));
        --color-2: rgb(var(--color-rgb-2));
        --color-3: rgb(var(--color-rgb-3));
        --color-4: rgb(var(--color-rgb-4));
        --color-5: rgb(var(--color-rgb-5));
        --gradient-1: radial-gradient(108.8% 39.88% at 50.95% 52.94%, rgba(var(--color-rgb-4), .8) 0%, rgba(var(--color-rgb-2), .8) 97%);
        --gradient-2: radial-gradient(circle, rgba(var(--color-rgb-5), .2) 10%, rgba(var(--color-rgb-2), 1) 100%);
        --shadow: .5rem .5rem .5rem rgba(var(--color-rgb-6), .2);
        --background: url("./background-dark.webp");
    }
}

@media (prefers-color-scheme: light) {
    :root {
        --color-rgb-1: 21, 0, 42; /* dark purple */
        --color-rgb-2: 255, 245, 254; /* light pink */
        --color-rgb-3: 88, 3, 67; /* plum */
        --color-rgb-4: 253, 227, 250; /* pink */
        --color-rgb-5: 208, 0, 200; /* magenta */
        --color-rgb-6: 0, 0, 0; /* black */
        --color-1: rgb(var(--color-rgb-1));
        --color-2: rgb(var(--color-rgb-2));
        --color-3: rgb(var(--color-rgb-3));
        --color-4: rgb(var(--color-rgb-4));
        --color-5: rgb(var(--color-rgb-5));
        --gradient-1: radial-gradient(108.8% 39.88% at 50.95% 52.94%, rgba(var(--color-rgb-4), .8) 0%, rgba(var(--color-rgb-2), .8) 97%);
        --gradient-2: radial-gradient(circle, rgba(var(--color-rgb-4), .2) 10%, rgba(var(--color-rgb-2), 1) 100%);
        --shadow: .5rem .5rem .5rem rgba(var(--color-rgb-6), .05);
        --background: url("./background-light.webp");
    }
}

:root {
    --font-family-text: "Rethink Sans", Helvetica, Arial, sans-serif;
    --font-family-title: "Rethink Sans", Helvetica, Arial, sans-serif;
    --max-width-container: 75rem;
    --padding-layout: 1rem;
    --padding-spacer: 2rem;
    --avatar-size: 6rem;
}

.body {
    font-family: var(--font-family-text);
    font-synthesis: none;
    color: var(--color-1);
    background-attachment: fixed;
    background-size: cover;
    background-color: var(--color-2);
    background-image: var(--gradient-1), var(--background);
}

abbr {
    text-decoration: none;
}

h1, h2, h3, h4, h5, h6, p, ul, ol, li {
    margin-top: 0;
    margin-bottom: 0;
}

.sr-only {
    width: 1px !important;
	height: 1px !important;
	position: absolute !important;
    clip-path: inset(50%) !important;
	overflow: hidden !important;
	padding: 0 !important;
	border: 0 !important;
	white-space: nowrap !important;
}

/* -- Header -- */
.header {
    display: flex;
    justify-content: center;
    padding: var(--padding-spacer) var(--padding-layout);
}

.header__container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    width: 100%;
    max-width: var(--max-width-container);
}

.header__hero {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.header__title {
    font-size: clamp(2rem, 10vw, 5rem);
    line-height: 1.2;
}

.header__title-feat {
    color: rgba(var(--color-4), .8);
    text-transform: uppercase;
}

.header__image-container {
    order: -1;
    display: flex;
    align-items: center;
    position: relative;
}

.header__image-container::before {
    content: "";
    display: block;
    width: calc((var(--avatar-size)) * 2.25);
    height: var(--avatar-size);
    position: absolute;
    left: calc((var(--avatar-size)) / 2);
    z-index: -1;
    background-repeat: no-repeat;
    background-size: 100%;
    background-image: url("./rgb.svg");
}

.header__image {    
    width: var(--avatar-size);
    height: auto;
    border-radius: 100%;
}

.header__text {
    font-size: clamp(1rem, 3vw, 1.5rem);
    line-height: 1.5;
}

.header__elements {
    display: grid;
    gap: 1rem;
    padding-left: 0;
}

/* -- Breadcrumb -- */
.breadcrumb {
    display: flex;
    justify-content: center;
    padding: 0 var(--padding-layout) var(--padding-spacer) var(--padding-layout);
}

.breadcrumb__list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    width: 100%;
    max-width: var(--max-width-container);
    padding-left: 0;
}

.breadcrumb__item {
    list-style-type: none;
}

.breadcrumb__item:not(:last-child)::after {
    content: "/";
}

.breadcrumb__link {    
    color: var(--color-1);
    text-underline-offset: .3em;
}

.breadcrumb__link:focus,
.breadcrumb__link:hover {
    color: var(--color-3);
}

.breadcrumb__current {
    font-weight: 700;
}

/* -- Content -- */
.content {
    display: flex;
    justify-content: center;
    padding: 0 var(--padding-layout) var(--padding-spacer) var(--padding-layout);
}

/* -- Element -- */
.element {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    position: relative;
    aspect-ratio: 1;
    padding: 1.2rem 1rem 1rem 1rem;
    border-radius: 1rem;
    background-repeat: no-repeat;
    background-color: var(--color-2);
    background-image: var(--gradient-2);
    box-shadow: var(--shadow);
}

.element__label {
    font-weight: 700;
    text-align: center;
}

.element::before {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: var(--color-3);
}

.element::after {
    order: -1;
    font-size: clamp(2rem, 10vw, 5rem);
    font-weight: 700;
}

.element--ux::before { content: "1"; }
.element--ux::after { content: "Ux"; }

.element--ui::before { content: "2"; }
.element--ui::after { content: "Ui"; }

.element--fd::before { content: "3"; }
.element--fd::after { content: "Fd"; }

.element--ay::before { content: "4"; }
.element--ay::after { content: "Ay"; }

.element--e::before { content: "5"; }
.element--e::after { content: "E"; }

.element--c::before { content: "6"; }
.element--c::after { content: "C"; }

/* -- Card Grid -- */
.card-grid {
    display: grid;
    gap: 1rem;
    width: 100%;
    max-width: var(--max-width-container);
}

/* -- Card -- */
.card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 2rem;
    border-radius: 1rem;
    background-repeat: no-repeat;
    background-color: var(--color-2);
    background-image: var(--gradient-2);
    box-shadow: var(--shadow);
}

.card__icon {
    width: 36px;
    height: 36px;
    fill: var(--color-3);
}

.card__title {
    line-height: 1.5;
}

.card__title::after {
    content: "";
    display: block;
    width: 2rem;
    height: 1rem;
    border-bottom: .1rem solid var(--color-1);
}

.card__list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding-left: 1em;
}

.card__item {
    list-style-type: square;
    line-height: 1.5;
}

.card__link {
    color: var(--color-1);
    text-underline-offset: .3em;
}

.card__link:focus,
.card__link:hover {
    color: var(--color-3);
}

.card__socials-list {
    display: flex;
    gap: 1rem;
    padding-left: 0;
}

.card__socials-item {
    list-style-type: none;
}

/* -- Social -- */
.social {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: .5rem;
    border: .2em solid var(--color-1);
    border-radius: 100%;
}

.social:focus,
.social:hover {
    border-color: var(--color-3);
}

.social__icon {
    width: 1.5rem;
    height: 1.5rem;
    fill: var(--color-1);
}

.social:focus .social__icon,
.social:hover .social__icon {
    fill: var(--color-3);
}

.social__label {
    color: var(--color-1);
}

/* -- Footer -- */
.footer {
    display: flex;
    justify-content: center;
    padding: 0 var(--padding-layout) var(--padding-spacer) var(--padding-layout);
}

.footer__container {
    display: grid;
    gap: 1rem;
    width: 100%;
    max-width: var(--max-width-container);
}

.footer__item {
    font-size: .8rem;
    line-height: 1.5;
}

.footer__link {
    color: var(--color-1);
    text-underline-offset: .3em;
}

.footer__link:focus,
.footer__link:hover {
    color: var(--color-3);
}

.footer__featured {
    display: flex;
    align-items: baseline;
    gap: .5rem;
}

.footer__icon {
    flex-shrink: 0;
    width: 2.5rem;
    fill: var(--color-3);  
}

@media (min-width: 20rem) {
    .header__elements {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 40rem) {
    :root {
        --padding-layout: 2rem;
        --padding-spacer: 5rem;
        --avatar-size: 7.5rem;
    }

    .header__elements {
        grid-template-columns: repeat(3, 1fr);
    }

    .element {
        justify-content: initial;
        aspect-ratio: initial;
        padding: 1.7rem 1.5rem 1.5rem 1.5rem;
    }

    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem;
    }

    .card-grid .card--featured {
        grid-column: 2;
        grid-row: 1 / span 4;
    }

    .footer__container {
        grid-template-columns: repeat(2, 1fr);
        align-items: end;
        gap: 3rem;
    }

    .footer__featured {
        justify-self: end;
    }
}

@media (min-width: 75rem) {
    .header__elements {
        grid-template-columns: repeat(6, 1fr);
        gap: 2rem;
    }

    .card-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}