/* ===== Tokens ===== */
:root {
    --ae-navy: #0f2d4d;
    --ae-blue: #1c5790;
    --ae-light-blue: #2eb5e7;
    --ae-gray: #666666;
    --ae-text: #1a1a1a;
    --ae-bg: #ffffff;
    --ae-bg-alt: #f4f7fa;
    --ae-head-bg: rgba(255, 255, 255, 0.92);
    --ae-head-border: rgba(0, 0, 0, 0.06);
    --ae-card-bg: #ffffff;
    --ae-card-shadow: rgba(15, 45, 77, 0.06);
    --ae-card-shadow-hover: rgba(15, 45, 77, 0.14);
    --ae-radius: 12px;
    --ae-max-width: 1160px;
    --ae-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html[data-theme="dark"] {
    --ae-text: #eef2f6;
    --ae-bg: #0b1622;
    --ae-bg-alt: #0f1d2d;
    --ae-head-bg: rgba(11, 22, 34, 0.85);
    --ae-head-border: rgba(255, 255, 255, 0.08);
    --ae-card-bg: #102233;
    --ae-card-shadow: rgba(0, 0, 0, 0.3);
    --ae-card-shadow-hover: rgba(0, 0, 0, 0.45);
    --ae-gray: #9fb0c0;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: var(--ae-font);
    color: var(--ae-text);
    background: var(--ae-bg);
    transition: background 0.3s ease, color 0.3s ease;
}

.gh-content[style] {
    font-family: var(--gh-font-body, var(--ae-font));
}

.gh-content h1[style], .gh-content h2[style], .gh-content h3[style] {
    font-family: var(--gh-font-heading, var(--ae-font));
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ===== Header / Nav ===== */
.ae-head {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--ae-head-bg);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--ae-head-border);
    box-shadow: 0 1px 0 rgba(15, 45, 77, 0.03), 0 8px 24px rgba(15, 45, 77, 0.04);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.ae-head__inner {
    max-width: var(--ae-max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 12px 24px;
}

.ae-head__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 18px;
    color: var(--ae-blue);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.ae-head__brand:hover {
    transform: translateY(-1px);
}

.ae-head__logo {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.ae-head__nav {
    flex: 1;
}

.ae-head__nav ul,
.ae-head__nav .nav {
    display: flex;
    align-items: center;
    gap: 22px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ae-head__nav li {
    list-style: none;
}

.ae-head__nav a {
    font-weight: 600;
    font-size: 15px;
    color: var(--ae-text);
    padding: 6px 0;
    position: relative;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.ae-head__nav a:hover {
    color: var(--ae-blue);
}

.ae-head__nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: var(--ae-light-blue);
    transition: width 0.2s ease;
}

.ae-head__nav a:hover::after {
    width: 100%;
}

.ae-head__actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.ae-head__signin {
    font-weight: 600;
    font-size: 14px;
    color: var(--ae-text);
}

.ae-head__theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--ae-head-border);
    background: transparent;
    color: var(--ae-blue);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.ae-head__theme-toggle:hover {
    background: rgba(28, 87, 144, 0.08);
    transform: rotate(15deg);
}

.ae-head__theme-toggle .ae-icon-moon { display: none; }
html[data-theme="dark"] .ae-head__theme-toggle .ae-icon-sun { display: none; }
html[data-theme="dark"] .ae-head__theme-toggle .ae-icon-moon { display: block; }

.ae-head__subscribe {
    background: var(--ae-blue);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    padding: 9px 18px;
    border-radius: 999px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.ae-head__subscribe:hover {
    background: var(--ae-light-blue);
    transform: translateY(-1px);
}

.ae-head__burger {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.ae-head__burger span {
    width: 22px;
    height: 2px;
    background: var(--ae-blue);
    border-radius: 2px;
}

/* ===== Hero ===== */
.ae-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(125deg, var(--ae-navy) 0%, var(--ae-blue) 45%, var(--ae-light-blue) 80%, var(--ae-blue) 100%);
    background-size: 200% 200%;
    animation: ae-gradient-shift 18s ease infinite;
    padding: 110px 24px 150px;
    text-align: center;
}

@keyframes ae-gradient-shift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.ae-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.12), transparent 55%);
    pointer-events: none;
}

.ae-hero__watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 480px;
    height: 480px;
    transform: translate(-50%, -50%);
    opacity: 0.06;
    z-index: 1;
    pointer-events: none;
}

.ae-hero__orb {
    position: absolute;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    padding: 8px;
    animation: ae-float 7s ease-in-out infinite;
    transition: transform 0.3s ease, background 0.3s ease, width 0.3s ease, height 0.3s ease, border-radius 0.3s ease;
}

.ae-hero__orb:hover {
    width: 168px;
    height: 168px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.18);
    transform: scale(1.04);
    animation-play-state: paused;
    z-index: 4;
}

.ae-hero__orb-label {
    font-weight: 700;
    font-size: 14px;
}

.ae-hero__orb-desc {
    font-size: 11px;
    line-height: 1.3;
    opacity: 0;
    max-height: 0;
    margin-top: 0;
    overflow: hidden;
    transition: opacity 0.25s ease 0.05s, max-height 0.3s ease, margin-top 0.2s ease;
}

.ae-hero__orb:hover .ae-hero__orb-desc {
    opacity: 0.9;
    max-height: 60px;
    margin-top: 6px;
}

.ae-hero__orb--blog     { top: 10%;  left: 9%;  animation-delay: 0s; }
.ae-hero__orb--podcasty { top: 6%;   right: 11%; animation-delay: 1.5s; }
.ae-hero__orb--webinary { bottom: 14%; left: 13%; animation-delay: 3s; }
.ae-hero__orb--kontakt  { bottom: 8%;  right: 7%;  animation-delay: 4.5s; }

@keyframes ae-float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(0, -14px); }
}

.ae-hero__content {
    position: relative;
    z-index: 3;
    max-width: 600px;
    margin: 0 auto;
}

.ae-hero h1 {
    color: #fff;
    font-size: clamp(32px, 5vw, 50px);
    font-weight: 800;
    margin: 0 0 16px;
    line-height: 1.15;
}

.ae-hero p {
    color: rgba(255, 255, 255, 0.88);
    font-size: 17px;
    margin: 0 auto 30px;
}

.ae-hero__cta {
    display: inline-block;
    background: #fff;
    color: var(--ae-blue);
    font-weight: 700;
    padding: 14px 30px;
    border-radius: 999px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ae-hero__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* ===== Feed / Cards ===== */
.ae-feed {
    background: var(--ae-bg-alt);
    padding: 64px 24px 80px;
    transition: background 0.3s ease;
}

.ae-feed__inner {
    max-width: var(--ae-max-width);
    margin: 0 auto;
}

.ae-feed__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.ae-feed__empty {
    text-align: center;
    color: var(--ae-gray);
    padding: 40px 0;
}

.ae-card {
    background: var(--ae-card-bg);
    border-radius: var(--ae-radius);
    overflow: hidden;
    box-shadow: 0 2px 10px var(--ae-card-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.3s ease;
}

.ae-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px var(--ae-card-shadow-hover);
}

.ae-card__link {
    display: block;
}

.ae-card__image {
    height: 180px;
    background-size: cover;
    background-position: center;
    background-color: #dde6ee;
}

.ae-card__image--placeholder {
    background: linear-gradient(135deg, var(--ae-blue), var(--ae-light-blue));
}

.ae-card--podcast .ae-card__image--placeholder::after,
.ae-card--podcast .ae-card__tag {
    background: #6f3fc4;
}

.ae-card--webinar .ae-card__tag {
    background: #c4453f;
}

.ae-card__body {
    padding: 18px 20px 22px;
}

.ae-card__tag {
    display: inline-block;
    background: var(--ae-light-blue);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 10px;
}

.ae-card__title {
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 8px;
    line-height: 1.3;
}

.ae-card__excerpt {
    font-size: 14px;
    color: var(--ae-gray);
    margin: 0 0 12px;
    line-height: 1.5;
}

.ae-card__meta {
    font-size: 12px;
    color: #9aa6b2;
    font-weight: 600;
}

.gh-pagination {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 48px;
    font-weight: 700;
}

.gh-pagination a {
    color: var(--ae-blue);
}

/* ===== Single post ===== */
.ae-post {
    max-width: 760px;
    margin: 0 auto;
    padding: 56px 24px 80px;
}

.ae-post__header {
    text-align: center;
    margin-bottom: 32px;
}

.ae-post__tag {
    display: inline-block;
    background: var(--ae-blue);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 5px 14px;
    border-radius: 999px;
    margin-bottom: 16px;
}

.ae-post__title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 14px;
}

.ae-post__meta {
    color: var(--ae-gray);
    font-size: 14px;
}

.ae-post__feature {
    border-radius: var(--ae-radius);
    overflow: hidden;
    margin-bottom: 40px;
}

.ae-post__content {
    font-size: 18px;
    line-height: 1.75;
}

.ae-post__content h2, .ae-post__content h3 {
    color: var(--ae-navy);
    font-weight: 800;
}

.ae-post__content a {
    color: var(--ae-blue);
    text-decoration: underline;
}

.ae-post__content iframe {
    max-width: 100%;
    border-radius: var(--ae-radius);
}

.ae-post__content img {
    border-radius: var(--ae-radius);
}

.ae-post__content .kg-width-wide {
    width: 120%;
    max-width: 120%;
    margin-left: -10%;
}

.ae-post__content .kg-width-full {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
}

.ae-post__footer {
    margin-top: 48px;
    padding-top: 28px;
    border-top: 1px solid #eee;
}

.ae-post__author {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ae-post__author-img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
}

.ae-post__author-name {
    font-weight: 700;
    margin: 0;
}

.ae-post__author-bio {
    color: var(--ae-gray);
    font-size: 14px;
    margin: 2px 0 0;
}

.ae-post-nav {
    max-width: 760px;
    margin: 0 auto 60px;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-weight: 700;
}

.ae-post-nav__link {
    color: var(--ae-blue);
}

/* ===== Error ===== */
.ae-error {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 24px;
}

.ae-error__logo {
    width: 64px;
    margin: 0 auto 20px;
}

.ae-error__code {
    font-size: 64px;
    font-weight: 800;
    color: var(--ae-blue);
    margin: 0;
}

.ae-error__message {
    color: var(--ae-gray);
    margin: 8px 0 24px;
}

.ae-error__cta {
    display: inline-block;
    background: var(--ae-blue);
    color: #fff;
    font-weight: 700;
    padding: 12px 26px;
    border-radius: 999px;
}

/* ===== Footer ===== */
.ae-footer {
    background: var(--ae-navy);
    color: rgba(255, 255, 255, 0.7);
    padding: 56px 24px 0;
}

.ae-footer__inner {
    max-width: var(--ae-max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.ae-footer__col--brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.ae-footer__logo {
    width: 40px;
    margin: 0 0 12px;
}

.ae-footer__title {
    color: #fff;
    font-weight: 700;
    margin: 0 0 8px;
    font-size: 16px;
}

.ae-footer__tagline {
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    max-width: 280px;
}

.ae-footer__heading {
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 16px;
}

.ae-footer__links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ae-footer__links a {
    font-size: 14px;
    transition: color 0.2s ease;
}

.ae-footer__links a:hover {
    color: #fff;
}

.ae-footer__social {
    display: flex;
    gap: 12px;
}

.ae-footer__social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: background 0.2s ease, transform 0.2s ease;
}

.ae-footer__social a:hover {
    background: var(--ae-light-blue);
    transform: translateY(-2px);
}

.ae-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    text-align: center;
}

.ae-footer__copy {
    font-size: 13px;
    margin: 0;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .ae-feed__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 720px) {
    .ae-head__nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--ae-bg);
        flex-direction: column;
        gap: 0;
        padding: 8px 24px 16px;
        display: none;
        border-bottom: 1px solid var(--ae-head-border);
    }

    .ae-head__nav.is-open {
        display: flex;
    }

    .ae-head__nav ul,
    .ae-head__nav .nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .ae-head__nav a {
        padding: 10px 0;
        display: block;
    }

    .ae-head__burger {
        display: flex;
    }

    .ae-head__actions .ae-head__signin {
        display: none;
    }

    .ae-hero__orb {
        display: none;
    }

    .ae-feed__grid {
        grid-template-columns: 1fr;
    }

    .ae-post {
        padding: 40px 20px 60px;
    }

    .ae-footer__inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .ae-footer__col--brand {
        align-items: center;
        text-align: center;
    }

    .ae-footer__tagline {
        max-width: none;
    }
}
