/* =========================================================
   markus.staeheli.info
   Global Styles
   ========================================================= */

/* ---------------------------------------------------------
   Design tokens
   --------------------------------------------------------- */

:root {
    --color-page: #0b1018;
    --color-sidebar: #0e1520;
    --color-surface: #111a26;
    --color-border: #1d2a3a;
    --color-text: #f5f7fa;
    --color-text-muted: #8f9aaa;
    --color-accent: #2f8cff;

    --layout-max-width: 1600px;
    --layout-gutter: 48px;
    --layout-gap: 72px;
    --sidebar-width: 280px;
    --content-max-width: 1180px;
}

/* ---------------------------------------------------------
   Reset
   --------------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
}

/* ---------------------------------------------------------
   Base
   --------------------------------------------------------- */

body {
    overflow: hidden;
    background: var(--color-page);
    color: var(--color-text);
    font-family: Inter, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-synthesis: none;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

h1,
p {
    margin-top: 0;
}

/* ---------------------------------------------------------
   Site layout
   --------------------------------------------------------- */

.site-layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    gap: var(--layout-gap);
    align-items: stretch;
    width: min(calc(100% - (var(--layout-gutter) * 2)), var(--layout-max-width));
    height: 100vh;
    margin: 0 auto;
    padding: 32px 0;
}

.site-sidebar {
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 40px 32px;
    overflow-y: auto;
    background: var(--color-sidebar);
    border: 1px solid var(--color-border);
    border-radius: 28px;
}

.sidebar-inner {
    width: 100%;
}

.site-main {
    min-width: 0;
    min-height: 0;
    height: calc(100% - 48px);
    margin: 24px 0;
}

.content-shell {
    width: min(100%, var(--content-max-width));
    height: 100%;
    margin: 0 auto;
    overflow: hidden;
    background: radial-gradient(circle at 85% 10%, rgba(47, 140, 255, 0.07), transparent 34%), rgba(14, 21, 32, 0.74);
    border: 1px solid var(--color-border);
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
}

.content-scroll {
    height: calc(100% - 16px);
    margin: 8px 6px 8px 0;
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: 22px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(47, 140, 255, 0.46) transparent;
    scrollbar-gutter: stable;
}

.content-scroll::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.content-scroll::-webkit-scrollbar-track {
    margin-block: 4px;
    background: transparent;
}

.content-scroll::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
    -webkit-appearance: none;
}

.content-scroll::-webkit-scrollbar-thumb {
    background: rgba(47, 140, 255, 0.46);
    background-clip: content-box;
    border: 2px solid transparent;
    border-radius: 999px;
}

.content-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(47, 140, 255, 0.72);
    background-clip: content-box;
}

.content-scroll::-webkit-scrollbar-corner {
    background: transparent;
}

/* ---------------------------------------------------------
   Sidebar profile
   --------------------------------------------------------- */

.sidebar-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sidebar-profile__photo {
    display: grid;
    place-items: center;
    width: min(100%, 200px);
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: radial-gradient(circle at 50% 25%, rgba(47, 140, 255, 0.18), transparent 48%), var(--color-surface);
    border: 1px solid rgba(47, 140, 255, 0.28);
    border-radius: 24px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

.sidebar-profile__photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.sidebar-profile__name {
    margin: 28px 0 0;
    color: var(--color-text);
    font-size: 1.5rem;
    font-weight: 650;
    line-height: 1.25;
    text-align: center;
}

/* ---------------------------------------------------------
   Sidebar navigation
   --------------------------------------------------------- */

.sidebar-nav {
    margin-top: 68px;
}

.sidebar-nav__list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sidebar-nav__link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 48px;
    padding: 11px 14px 11px 18px;
    color: var(--color-text-muted);
    border-radius: 12px;
    font-size: 0.98rem;
    font-weight: 560;
    text-decoration: none;
    transition: color 180ms ease, background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.sidebar-nav__link::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 3px;
    height: 28px;
    background: var(--color-accent);
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 14px rgba(47, 140, 255, 0.42);
    opacity: 0;
    transform: translateY(-50%) scaleY(0.55);
    transition: opacity 180ms ease, transform 180ms ease;
}

.sidebar-nav__icon {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    color: #78879a;
    transition: color 180ms ease;
}

.sidebar-nav__icon svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.sidebar-nav__link:hover,
.sidebar-nav__link:focus-visible {
    color: var(--color-text);
    background: rgba(47, 140, 255, 0.07);
    outline: none;
    transform: translateX(3px);
}

.sidebar-nav__link:hover .sidebar-nav__icon,
.sidebar-nav__link:focus-visible .sidebar-nav__icon {
    color: var(--color-accent);
}

.sidebar-nav__link.is-active {
    color: var(--color-text);
    background: linear-gradient(90deg, rgba(47, 140, 255, 0.23) 0%, rgba(31, 58, 88, 0.72) 42%, rgba(17, 26, 38, 0.94) 100%);
    box-shadow: inset 0 0 0 1px rgba(82, 154, 255, 0.18), 0 12px 28px rgba(0, 0, 0, 0.12);
    font-weight: 650;
}

.sidebar-nav__link.is-active::before {
    opacity: 1;
    transform: translateY(-50%) scaleY(1);
}

.sidebar-nav__link.is-active .sidebar-nav__icon {
    color: var(--color-accent);
}

/* ---------------------------------------------------------
   Sidebar socials
   --------------------------------------------------------- */

.sidebar-socials {
    margin-top: 58px;
}

.sidebar-socials__title {
    margin: 0 0 16px;
    color: #6f7d90;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.sidebar-socials__links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.sidebar-socials__link {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: #8492a5;
    background: rgba(17, 26, 38, 0.88);
    border: 1px solid rgba(117, 139, 165, 0.14);
    border-radius: 12px;
    text-decoration: none;
    transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.sidebar-socials__link:hover,
.sidebar-socials__link:focus-visible {
    color: var(--color-accent);
    background: rgba(47, 140, 255, 0.10);
    border-color: rgba(47, 140, 255, 0.34);
    box-shadow: 0 0 20px rgba(47, 140, 255, 0.10);
    outline: none;
    transform: translateY(-2px);
}

.sidebar-socials__icon {
    width: 18px;
    height: 18px;
    background: currentColor;
    -webkit-mask: var(--social-icon) center / contain no-repeat;
    mask: var(--social-icon) center / contain no-repeat;
}

/* ---------------------------------------------------------
   Home / Hero
   --------------------------------------------------------- */

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(300px, 0.82fr);
    column-gap: 32px;
    row-gap: 24px;
    align-content: start;
    min-height: 100%;
    padding: 60px 72px 76px;
}

.hero__content {
    width: 100%;
    max-width: 700px;
}

.hero__title {
    max-width: 700px;
    margin: 0;
    color: #f2f4f7;
    font-size: clamp(2.8rem, 3.55vw, 4rem);
    font-weight: 680;
    letter-spacing: -0.028em;
    line-height: 1.06;
}

.hero__title span {
    display: block;
    width: fit-content;
    margin-top: 5px;
    background: linear-gradient(180deg, #f7fbff 0%, #d8eaff 18%, #a8cfff 38%, #6aa7f3 62%, #438ce8 80%, #2f78d4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    font-size: 1.16em;
    font-weight: 700;
    text-shadow: 0 0 16px rgba(47, 120, 212, 0.05);
}

.hero__title::after {
    content: "";
    display: block;
    width: 66px;
    height: 2px;
    margin-top: 22px;
    background: #4f93e8;
    border-radius: 999px;
    box-shadow: 0 0 12px rgba(79, 147, 232, 0.18);
}

.hero__role {
    margin: 24px 0 0;
    color: #c9d0d9;
    font-size: clamp(1rem, 1.18vw, 1.14rem);
    font-weight: 560;
    letter-spacing: 0;
}

.hero__role span {
    margin: 0 0.45em;
    color: #4f93e8;
    opacity: 0.72;
}

.hero__description {
    max-width: 650px;
    margin: 18px 0 0;
    color: #939daa;
    font-size: 1.04rem;
    line-height: 1.76;
}

.hero__visual {
    position: relative;
    align-self: start;
    min-width: 0;
    margin-top: 18px;
}

.hero__visual::before {
    content: "";
    position: absolute;
    inset: 12% -12% 6% -24%;
    background: radial-gradient(ellipse at 58% 60%, rgba(47, 120, 212, 0.13), transparent 62%);
    filter: blur(18px);
    pointer-events: none;
}

.hero-wave {
    position: relative;
    display: block;
    width: 122%;
    max-width: 570px;
    margin-left: -22%;
    overflow: visible;
    filter: drop-shadow(0 0 12px rgba(67, 140, 232, 0.08));
}

/* ---------------------------------------------------------
   Hero competency cards
   --------------------------------------------------------- */

.hero__cards {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
    margin-top: 0;
}

.hero-card {
    min-width: 0;
    padding: 18px 20px;
    background: linear-gradient(145deg, rgba(22, 33, 48, 0.92), rgba(13, 20, 30, 0.78));
    border: 1px solid rgba(112, 139, 171, 0.22);
    border-radius: 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02), 0 16px 38px rgba(0, 0, 0, 0.12);
}

.hero-card__header {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 14px;
}

.hero-card__header h2 {
    margin: 0;
    color: #eef3f9;
    font-size: 0.96rem;
    font-weight: 680;
    line-height: 1.3;
}

.hero-card__icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    color: #5a9bec;
    background: rgba(47, 140, 255, 0.07);
    border: 1px solid rgba(100, 164, 243, 0.28);
    border-radius: 50%;
}

.hero-card__icon svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.hero-card__list {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hero-card__list li {
    position: relative;
    padding-left: 22px;
    color: #aeb8c5;
    font-size: 0.88rem;
    line-height: 1.45;
}

.hero-card__list li::before {
    content: "✓";
    position: absolute;
    top: 0.15em;
    left: 0;
    display: grid;
    place-items: center;
    width: 15px;
    height: 15px;
    color: #65a6f3;
    border: 1px solid rgba(101, 166, 243, 0.72);
    border-radius: 50%;
    font-size: 0.58rem;
    font-weight: 800;
    line-height: 1;
}

/* ---------------------------------------------------------
   Responsive base
   --------------------------------------------------------- */

@media (max-width: 1100px) {
    :root {
        --layout-gutter: 32px;
        --layout-gap: 40px;
        --sidebar-width: 260px;
    }

    .hero {
        grid-template-columns: 1fr;
        padding: 56px 52px 68px;
    }

    .hero__visual {
        display: none;
    }

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

@media (max-width: 900px) {
    :root {
        --layout-gutter: 24px;
    }

    body {
        overflow: auto;
    }

    .site-layout {
        display: block;
        height: auto;
        min-height: 100vh;
        padding: 0;
    }

    .site-sidebar {
        width: 100%;
        height: auto;
        min-height: auto;
        margin-top: 24px;
        padding: 24px;
        overflow: visible;
        border-radius: 20px;
    }

    .site-main {
        height: auto;
        margin: 0;
    }

    .content-shell {
        width: 100%;
        height: auto;
        margin: 24px auto;
        overflow: visible;
        border-radius: 20px;
    }

    .content-scroll {
        height: auto;
        margin: 0;
        overflow: visible;
        border-radius: inherit;
        scrollbar-gutter: auto;
    }

    .sidebar-profile__photo {
        width: 160px;
    }

    .sidebar-nav,
    .sidebar-socials {
        margin-top: 40px;
    }

    .hero {
        min-height: auto;
        padding: 52px 28px 64px;
    }

    .hero__title {
        font-size: clamp(2.5rem, 9.5vw, 3.7rem);
    }

    .hero__description {
        font-size: 1rem;
    }

    .hero-card {
        padding: 18px;
    }
}
