/*
Theme Name: HTaleb Platform
Theme URI: https://taleb.fr/
Author: Hicham Taleb
Description: Portfolio Block Theme for DevOps, Platform Engineering and AI Platform Engineering.
Version: 0.1.0
Requires at least: 6.6
Requires PHP: 7.4
Text Domain: htaleb-platform
*/

:root {
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 80% 0%, rgb(56 189 248 / 8%), transparent 28rem),
        #080d13;
}

a {
    text-underline-offset: 0.2em;
}

:where(a, button, input, textarea, select):focus-visible {
    outline: 2px solid #38bdf8;
    outline-offset: 3px;
}

.site-header,
.site-footer {
    font-family: var(--wp--preset--font-family--manrope);
}

.site-header a,
.site-footer a {
    text-decoration: none !important;
}

.site-header {
    position: relative;
    z-index: 20;
    border-bottom: 1px solid rgb(148 180 203 / 14%);
    background:
        linear-gradient(90deg, rgb(56 189 248 / 3%), transparent 32%),
        rgb(7 13 20 / 97%);
}

.site-header__inner,
.site-footer__inner {
    width: min(calc(100% - 48px), var(--wp--style--global--wide-size, 1280px));
    margin-inline: auto !important;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 108px;
    gap: clamp(2rem, 3vw, 3rem);
}

.site-brand,
.footer-brand {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 1rem;
}

.brand-mark {
    display: block;
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    color: var(--wp--preset--color--primary-text);
}

.brand-mark__svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.brand-mark__letters,
.brand-mark__accent {
    fill: none;
    stroke: currentColor;
    stroke-linecap: square;
    stroke-linejoin: miter;
}

.brand-mark__letters {
    stroke-width: 2.4;
}

.brand-mark__accent {
    color: var(--wp--preset--color--signal);
    filter: drop-shadow(0 0 4px rgb(56 189 248 / 55%));
    stroke-width: 2;
}

.site-brand__copy,
.footer-brand__copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.35rem;
}

.site-header p,
.site-footer p {
    margin: 0;
}

.site-brand__name,
.footer-brand__name {
    color: var(--wp--preset--color--primary-text);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.05;
}

.site-brand__name a,
.footer-brand__name a {
    color: inherit !important;
}

.site-brand__tagline,
.footer-brand__baseline {
    color: #91a4b7;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    line-height: 1.4;
    text-transform: uppercase;
    white-space: nowrap;
}

.site-brand__tagline span,
.footer-brand__baseline span,
.site-footer__signature span {
    color: var(--wp--preset--color--signal);
}

.site-header__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
    gap: clamp(1.5rem, 2.5vw, 2.25rem);
}

.site-header__navigation {
    color: #d6e0e9;
    font-family: var(--wp--preset--font-family--manrope) !important;
    font-size: 0.875rem;
    font-weight: 500;
}

.site-header__navigation .wp-block-navigation__container {
    flex-wrap: nowrap;
    gap: clamp(1.2rem, 1.8vw, 1.75rem);
}

.site-header__navigation .wp-block-navigation-item__content {
    position: relative;
    padding-block: 0.65rem;
    color: inherit !important;
    white-space: nowrap;
    transition: color 0.18s ease;
}

.site-header__navigation .wp-block-navigation-item__content:hover {
    color: #eef8ff !important;
}

.site-header__navigation .current-menu-item > .wp-block-navigation-item__content,
.site-header__navigation .wp-block-navigation-item__content[aria-current="page"] {
    color: var(--wp--preset--color--signal) !important;
}

.site-header__navigation .current-menu-item > .wp-block-navigation-item__content::after,
.site-header__navigation .wp-block-navigation-item__content[aria-current="page"]::after {
    content: "";
    position: absolute;
    right: 0.15rem;
    bottom: 0.2rem;
    left: 0.15rem;
    height: 2px;
    border-radius: 2px;
    background: var(--wp--preset--color--signal);
    box-shadow: 0 0 7px rgb(56 189 248 / 42%);
}

.site-header__cta {
    flex: 0 0 auto;
}

.site-header__cta .wp-block-button__link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0.55rem 1.45rem;
    border: 1px solid rgb(56 189 248 / 72%);
    border-radius: 999px;
    background: rgb(56 189 248 / 4%);
    box-shadow: 0 0 18px rgb(56 189 248 / 10%);
    color: var(--wp--preset--color--signal) !important;
    font-family: var(--wp--preset--font-family--manrope) !important;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background 0.18s ease, box-shadow 0.18s ease;
}

.site-header__cta .wp-block-button__link:hover {
    background: rgb(56 189 248 / 11%);
    box-shadow: 0 0 24px rgb(56 189 248 / 16%);
}

.site-footer {
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgb(148 180 203 / 14%);
    background:
        radial-gradient(circle at 50% 0%, rgb(22 71 103 / 18%), transparent 34rem),
        linear-gradient(180deg, #09111a, #070c12);
}

.site-footer::before,
.site-footer::after {
    content: "";
    position: absolute;
    bottom: -1px;
    width: 310px;
    height: 190px;
    opacity: 0.42;
    background: repeating-radial-gradient(ellipse at bottom left, transparent 0 38px, rgb(56 189 248 / 13%) 39px 40px, transparent 41px 58px);
    pointer-events: none;
}

.site-footer::before {
    left: -90px;
}

.site-footer::after {
    right: -90px;
    transform: scaleX(-1);
}

.site-footer__inner {
    position: relative;
    z-index: 1;
    padding-block: clamp(3.5rem, 5vw, 4rem) 1.75rem;
}

.wp-block-columns.site-footer__grid {
    display: grid;
    grid-template-columns:
        minmax(340px, 1.55fr)
        minmax(140px, 0.6fr)
        minmax(165px, 0.72fr)
        minmax(245px, 1fr);
    gap: 2.5rem;
    margin: 0;
}

.site-footer__grid > .wp-block-column {
    min-width: 0;
}

.footer-brand {
    margin-bottom: 1.7rem;
}

.footer-brand__name {
    font-size: 1.375rem;
}

.footer-brand__baseline {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
}

.site-footer__description,
.site-footer__updates p {
    color: #aebdca;
    font-size: 0.9375rem;
    line-height: 1.72;
}

.site-footer__description {
    max-width: 440px;
}

.site-footer__heading {
    margin: 0 0 1.4rem;
    color: var(--wp--preset--color--primary-text);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.3;
}

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

.site-footer__links li + li {
    margin-top: 0.65rem;
}

.site-footer__links a,
.footer-socials a {
    color: #aebdca !important;
    font-size: 0.9rem;
    transition: color 0.18s ease, transform 0.18s ease;
}

.site-footer__links a:hover,
.footer-socials a:hover {
    color: var(--wp--preset--color--signal) !important;
}

.footer-socials {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
}

.footer-socials a {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    white-space: nowrap;
}

.footer-socials a:hover {
    transform: translateX(2px);
}

.footer-socials svg {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.footer-socials a:last-child svg {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.6;
}

.site-footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-top: clamp(3rem, 5vw, 4rem);
    padding-top: 1.5rem;
    border-top: 1px solid rgb(148 180 203 / 14%);
    color: #8799aa;
    font-size: 0.72rem;
}

.site-footer__meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.5rem;
}

.site-footer__signature {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
}

.site-footer__back-to-top a {
    display: grid;
    width: 34px;
    height: 34px;
    border: 1px solid rgb(56 189 248 / 36%);
    border-radius: 50%;
    color: var(--wp--preset--color--signal) !important;
    place-items: center;
    font-size: 1rem;
    line-height: 1;
}

.site-footer__back-to-top a:hover {
    border-color: var(--wp--preset--color--signal);
    background: rgb(56 189 248 / 8%);
}

.wp-block-post-template > li {
    padding-block: clamp(1.5rem, 4vw, 3rem);
    border-top: 1px solid rgb(203 213 225 / 14%);
}

.wp-block-post-template > li:last-child {
    border-bottom: 1px solid rgb(203 213 225 / 14%);
}

@media (min-width: 1100px) {
    .wp-block-columns.site-footer__grid {
        gap: clamp(2.5rem, 3.35vw, 3rem);
    }

    .site-footer__heading,
    .site-footer__links a {
        white-space: nowrap;
    }
}

@media (min-width: 1280px) {
    .wp-block-columns.site-footer__grid {
        gap: 3rem;
    }
}

@media (max-width: 1099px) {
    .site-header__inner {
        min-height: 96px;
    }

    .site-header__cta {
        display: none;
    }

    .wp-block-columns.site-footer__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 3rem 2.5rem;
    }
}

@media (max-width: 900px) {
    .site-header__navigation .wp-block-navigation__responsive-container-open {
        display: flex !important;
    }

    .site-header__navigation .wp-block-navigation__responsive-container:not(.is-menu-open) {
        display: none !important;
    }

    .site-header .wp-block-navigation__responsive-container.is-menu-open {
        padding: 1.5rem 24px 2.5rem;
        background: var(--wp--preset--color--obsidian);
        color: var(--wp--preset--color--primary-text);
    }

    .site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
        align-items: flex-start;
        gap: 0.45rem;
    }

    .site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
        padding-block: 0.45rem;
        font-size: 1.35rem;
    }
}

@media (max-width: 700px) {
    .site-header__inner,
    .site-footer__inner {
        width: calc(100% - 32px);
    }

    .site-header__inner {
        min-height: 86px;
    }

    .brand-mark {
        flex-basis: 44px;
        width: 44px;
        height: 44px;
    }

    .site-brand {
        gap: 0.7rem;
    }

    .site-brand__name {
        font-size: 1.15rem;
    }

    .site-brand__tagline {
        font-size: 0.58rem;
        letter-spacing: 0.16em;
    }

    .wp-block-columns.site-footer__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 2.75rem;
    }

    .site-footer__bottom,
    .site-footer__meta {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-footer__meta {
        gap: 1rem;
    }

    .site-footer__signature {
        white-space: normal;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-header__navigation .wp-block-navigation-item__content,
    .site-header__cta .wp-block-button__link,
    .site-footer__links a,
    .footer-socials a {
        transition: none;
    }
}
