/* ============================================================
   AdamSooley.ca — About Me
   assets/css/about-me.css

   Matches the Start Here design while preserving the normal
   Ghost/Bold rendering of images, galleries, videos and cards.
   ============================================================ */


/* ============================================================
   VARIABLES
   ============================================================ */

.as-about {
    --as-blue: #1473e6;
    --as-blue-hover: #0d63ca;
    --as-text: #1f2933;
    --as-muted: #667085;
    --as-bg: #ffffff;
    --as-bg-alt: #f5f7fa;
    --as-card-bg: #ffffff;
    --as-border: rgba(0, 0, 0, 0.10);
    --as-border-hover: #1473e6;
    --as-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    --as-radius: 12px;

    width: 100%;
    overflow: hidden;

    color: var(--as-text);
    background: var(--as-bg);
}


/* ============================================================
   GLOBAL / CONTAINER
   ============================================================ */

.as-about *,
.as-about *::before,
.as-about *::after {
    box-sizing: border-box;
}

.as-about-container {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
}


/* ============================================================
   HERO
   ============================================================ */

.as-about-hero {
    position: relative;

    display: flex;
    align-items: center;

    min-height: 620px;
    overflow: hidden;

    color: #ffffff;
    background: #111827;

    isolation: isolate;
}

.as-about-hero__image {
    position: absolute;
    inset: 0;
    z-index: -3;
}

.as-about-hero__image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;
}

.as-about-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: -2;

    background:
        linear-gradient(
            90deg,
            rgba(5, 12, 22, 0.92) 0%,
            rgba(5, 12, 22, 0.78) 45%,
            rgba(5, 12, 22, 0.42) 75%,
            rgba(5, 12, 22, 0.30) 100%
        );
}

.as-about-hero__content {
    position: relative;
    z-index: 1;

    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 100px 0;

    color: #ffffff;
}

.as-about-hero__content > * {
    max-width: 720px;
}

.as-about-hero__eyebrow {
    display: inline-block;

    margin-bottom: 18px;

    color: #8fc5ff;

    font-family: var(--gh-font-body, inherit);
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1.2;

    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.as-about-hero h1 {
    margin: 0 0 18px;

    color: #ffffff;

    font-family: var(--gh-font-heading, inherit);
    font-size: clamp(3rem, 7vw, 5.7rem);
    font-weight: 800;
    line-height: 0.98;
    letter-spacing: -0.045em;
}

.as-about-hero__lead {
    margin: 0 0 20px;

    color: #ffffff;

    font-family: var(--gh-font-heading, inherit);
    font-size: clamp(1.45rem, 2.5vw, 2rem);
    font-weight: 700;
    line-height: 1.3;
}

.as-about-hero__intro {
    margin: 0 0 14px;

    color: rgba(255, 255, 255, 0.90);

    font-family: var(--gh-font-body, inherit);
    font-size: 1.08rem;
    line-height: 1.75;
}

.as-about-hero__aside {
    margin: 0 0 30px;

    color: rgba(255, 255, 255, 0.72);

    font-family: var(--gh-font-body, inherit);
    font-size: 1rem;
    font-style: italic;
    line-height: 1.6;
}


/* ============================================================
   BUTTONS
   ============================================================ */

.as-about-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 48px;
    padding: 12px 22px;

    border: 2px solid var(--as-blue);
    border-radius: 999px;

    color: var(--as-blue) !important;
    background: transparent;

    font-family: var(--gh-font-body, inherit);
    font-size: 0.94rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;

    text-decoration: none !important;

    transition:
        transform 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease;
}

.as-about-button:hover {
    transform: translateY(-2px);

    border-color: var(--as-blue-hover);

    color: #ffffff !important;
    background: var(--as-blue-hover);

    text-decoration: none !important;

    box-shadow: 0 8px 20px rgba(20, 115, 230, 0.20);
}

.as-about-button--primary {
    border-color: var(--as-blue);

    color: #ffffff !important;
    background: var(--as-blue);
}

.as-about-button--primary:hover {
    border-color: var(--as-blue-hover);

    color: #ffffff !important;
    background: var(--as-blue-hover);
}

.as-about-button:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 4px;
}


/* ============================================================
   INTRODUCTION
   ============================================================ */

.as-about-section {
    padding: 90px 0;

    background: var(--as-bg);
}

.as-about-section--intro {
    padding-top: 80px;
    padding-bottom: 70px;

    text-align: center;
}

.as-about-section--intro .as-about-container {
    max-width: 850px;
}

.as-about-kicker {
    display: block;

    margin-bottom: 7px;

    color: var(--as-blue);

    font-family: var(--gh-font-body, inherit);
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.3;

    letter-spacing: 0.075em;
    text-transform: uppercase;
}

.as-about-section--intro h2 {
    margin: 3px 0 0;

    color: var(--as-text);

    font-family: var(--gh-font-heading, inherit);
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.as-about-section__lead {
    width: 100%;
    max-width: 850px;

    margin: 18px auto 0;

    color: var(--as-muted);

    font-family: var(--gh-font-body, inherit);
    font-size: 1.06rem;
    line-height: 1.75;
}


/* ============================================================
   ABOUT STORY

   IMPORTANT:
   We style the story wrapper and direct text elements only.

   We deliberately DO NOT override:
   .kg-image-card
   .kg-gallery-card
   .kg-video-card
   .kg-audio-card
   .kg-embed-card
   .kg-bookmark-card
   .kg-width-wide
   .kg-width-full

   Those remain controlled by Ghost/Bold.
   ============================================================ */

.as-about-story {
    /*padding: 90px 0;*/

    color: var(--as-text);
    background: var(--as-bg-alt);
}

.as-about-story__content {
    width: min(920px, calc(100% - 48px));
    margin: 0 auto;

    color: var(--as-text);

    font-family: var(--gh-font-body, inherit);
    font-size: 1.06rem;
    line-height: 1.75;
}


/* ============================================================
   STORY PARAGRAPHS
   ============================================================ */

.as-about-story__content > p {
    margin-top: 0;
    margin-bottom: 20px;

    color: var(--as-muted);
}


/* ============================================================
   STORY HEADINGS
   ============================================================ */

.as-about-story__content > h2 {
    position: relative;

    margin: 70px 0 26px;
    padding-top: 26px;

    border-top: 1px solid var(--as-border);

    color: var(--as-text);

    font-family: var(--gh-font-heading, inherit);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.as-about-story__content > h2::before {
    content: "";

    position: absolute;
    top: -2px;
    left: 0;

    width: 70px;
    height: 3px;

    border-radius: 999px;

    background: var(--as-blue);
}

.as-about-story__content > h3 {
    margin: 42px 0 18px;

    color: var(--as-text);

    font-family: var(--gh-font-heading, inherit);
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.3;
}

.as-about-story__content > h4 {
    margin: 34px 0 15px;

    color: var(--as-text);

    font-family: var(--gh-font-heading, inherit);
    font-weight: 800;
}


/* ============================================================
   STORY LINKS
   ============================================================ */

.as-about-story__content > p a,
.as-about-story__content > ul a,
.as-about-story__content > ol a {
    color: var(--as-blue);

    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.as-about-story__content > p a:hover,
.as-about-story__content > ul a:hover,
.as-about-story__content > ol a:hover {
    color: var(--as-blue-hover);

    text-decoration-thickness: 2px;
}


/* ============================================================
   STORY LISTS
   ============================================================ */

.as-about-story__content > ul,
.as-about-story__content > ol {
    margin-top: 20px;
    margin-bottom: 28px;

    color: var(--as-muted);
}

.as-about-story__content > ul li,
.as-about-story__content > ol li {
    margin-bottom: 8px;
}


/* ============================================================
   CAPTIONS

   Only colour the caption.
   Ghost/Bold still controls the media card itself.
   ============================================================ */

.as-about-story__content figcaption {
    color: var(--as-muted);
}


/* ============================================================
   FINAL CTA
   ============================================================ */

.as-about-final {
    padding: 100px 0;

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #111827 0%,
            #16253a 60%,
            #0f315a 100%
        );

    text-align: center;
}

.as-about-final .as-about-container {
    max-width: 800px;
}

.as-about-final__icon {
    display: block;

    margin-bottom: 18px;

    font-size: 2.4rem;
    line-height: 1;
}

.as-about-final h2 {
    margin: 0 0 20px;

    color: #ffffff;

    font-family: var(--gh-font-heading, inherit);
    font-size: clamp(2.3rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.as-about-final p {
    margin: 0 auto 16px;

    color: rgba(255, 255, 255, 0.82);

    font-family: var(--gh-font-body, inherit);
    font-size: 1.06rem;
    line-height: 1.7;
}

.as-about-final__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;

    gap: 14px;

    margin-top: 32px;
}

.as-about-final .as-about-button:not(.as-about-button--primary) {
    border-color: rgba(255, 255, 255, 0.75);

    color: #ffffff !important;
}

.as-about-final .as-about-button:not(.as-about-button--primary):hover {
    border-color: #ffffff;

    color: #111827 !important;
    background: #ffffff;
}

.as-about-final .as-about-button:focus-visible {
    outline-color: #ffffff;
}


/* ============================================================
   DARK MODE
   ============================================================ */

html[theme-mode="dark"] .as-about {
    --as-text: #f5f7fa;
    --as-muted: #c5ced8;
    --as-bg: #10151c;
    --as-bg-alt: #161d26;
    --as-card-bg: #1b232e;
    --as-border: rgba(255, 255, 255, 0.14);
    --as-border-hover: #4da3ff;
    --as-shadow: 0 8px 24px rgba(0, 0, 0, 0.30);

    color: var(--as-text);
    background: var(--as-bg);
}


/* Introduction */

html[theme-mode="dark"] .as-about-section {
    background: var(--as-bg);
}

html[theme-mode="dark"] .as-about-section--intro h2 {
    color: var(--as-text);
}

html[theme-mode="dark"] .as-about-section__lead {
    color: var(--as-muted);
}

html[theme-mode="dark"] .as-about-kicker {
    color: #65afff;
}


/* Story */

html[theme-mode="dark"] .as-about-story {
    color: var(--as-text);
    background: var(--as-bg-alt);
}

html[theme-mode="dark"] .as-about-story__content {
    color: var(--as-text);
}

html[theme-mode="dark"] .as-about-story__content > p,
html[theme-mode="dark"] .as-about-story__content > ul,
html[theme-mode="dark"] .as-about-story__content > ol,
html[theme-mode="dark"] .as-about-story__content figcaption {
    color: var(--as-muted);
}

html[theme-mode="dark"] .as-about-story__content > h2,
html[theme-mode="dark"] .as-about-story__content > h3,
html[theme-mode="dark"] .as-about-story__content > h4 {
    color: var(--as-text);
}

html[theme-mode="dark"] .as-about-story__content > h2 {
    border-top-color: var(--as-border);
}

html[theme-mode="dark"] .as-about-story__content > h2::before {
    background: #65afff;
}

html[theme-mode="dark"] .as-about-story__content > p a,
html[theme-mode="dark"] .as-about-story__content > ul a,
html[theme-mode="dark"] .as-about-story__content > ol a {
    color: #65afff;
}

html[theme-mode="dark"] .as-about-story__content > p a:hover,
html[theme-mode="dark"] .as-about-story__content > ul a:hover,
html[theme-mode="dark"] .as-about-story__content > ol a:hover {
    color: #8bc6ff;
}


/* Buttons */

html[theme-mode="dark"] .as-about-button--primary {
    border-color: var(--as-blue);

    color: #ffffff !important;
    background: var(--as-blue);
}

html[theme-mode="dark"] .as-about-button--primary:hover {
    border-color: var(--as-blue-hover);

    color: #ffffff !important;
    background: var(--as-blue-hover);
}

html[theme-mode="dark"] .as-about-button:focus-visible {
    outline-color: #65afff;
}

html[theme-mode="dark"] .as-about-final .as-about-button:focus-visible {
    outline-color: #ffffff;
}


/* ============================================================
   TABLET
   ============================================================ */

@media (max-width: 900px) {

    .as-about-container,
    .as-about-hero__content {
        width: min(100% - 40px, 1180px);
    }


    /* Hero */

    .as-about-hero {
        min-height: 570px;
    }

    .as-about-hero__content {
        padding: 82px 0;
    }


    /* Sections */

    .as-about-section {
        padding: 72px 0;
    }

    .as-about-story {
        padding: 72px 0;
    }

    .as-about-story__content {
        width: min(920px, calc(100% - 40px));
    }

}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 640px) {

    .as-about-container,
    .as-about-hero__content {
        width: calc(100% - 32px);
    }


    /* ========================================================
       HERO
       ======================================================== */

    .as-about-hero {
        min-height: 610px;

        align-items: flex-end;
    }

    .as-about-hero__overlay {
        background:
            linear-gradient(
                0deg,
                rgba(5, 12, 22, 0.96) 0%,
                rgba(5, 12, 22, 0.78) 58%,
                rgba(5, 12, 22, 0.40) 100%
            );
    }

    .as-about-hero__content {
        padding: 72px 0 58px;
    }

    .as-about-hero h1 {
        font-size: clamp(2.8rem, 15vw, 4.4rem);
    }

    .as-about-hero__lead {
        font-size: 1.35rem;
    }

    .as-about-hero__intro {
        font-size: 1rem;
        line-height: 1.65;
    }

    .as-about-hero__aside {
        font-size: 0.94rem;
    }


    /* ========================================================
       INTRO
       ======================================================== */

    .as-about-section {
        padding: 60px 0;
    }

    .as-about-section--intro {
        padding-top: 56px;
        padding-bottom: 52px;
    }

    .as-about-section--intro h2 {
        font-size: 2rem;
    }

    .as-about-section__lead {
        font-size: 1rem;
        line-height: 1.68;
    }


    /* ========================================================
       STORY
       ======================================================== */



    .as-about-story__content {
        width: calc(100% - 32px);

        font-size: 1rem;
        line-height: 1.68;
    }

    .as-about-story__content > h2 {
        margin-top: 54px;
        padding-top: 22px;

        font-size: 2rem;
    }

    .as-about-story__content > h3 {
        margin-top: 34px;

        font-size: 1.4rem;
    }


    /* ========================================================
       BUTTONS
       ======================================================== */

    .as-about-button {
        width: 100%;
    }


    /* ========================================================
       FINAL CTA
       ======================================================== */

    .as-about-final {
        padding: 72px 0;
    }

    .as-about-final__actions {
        flex-direction: column;
    }

}


/* ============================================================
   SMALL MOBILE
   ============================================================ */

@media (max-width: 390px) {

    .as-about-container,
    .as-about-hero__content {
        width: calc(100% - 26px);
    }

    .as-about-hero h1 {
        font-size: 2.7rem;
    }

    .as-about-section {
        padding: 52px 0;
    }

    .as-about-story {
        padding: 52px 0;
    }

    .as-about-story__content {
        width: calc(100% - 26px);
    }

}


/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

    .as-about-button {
        transition: none;
    }

    .as-about-button:hover {
        transform: none;
    }

}

/* ============================================================
   REMOVE GAP BETWEEN ABOUT HERO AND STORY
   ============================================================ */

.as-about-story {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.as-about-story .bo-post-container,
.as-about-story .bo-generic-wrapper,
.as-about-story .bo-post-content {
    margin-top: 0 !important;
}

.as-about-story .bo-post-container {
    padding-top: 0 !important;
}

.as-about-story .bo-generic-wrapper {
    padding-top: 0 !important;
}

.as-about-story .bo-post-content {
    padding-top: 0 !important;
}

.as-about-story .bo-post-content > :first-child {
    margin-top: 0 !important;
}

/* ============================================================
   ABOUT INTRO TEXT ALIGNMENT
   ============================================================ */

.as-about-section--intro .as-about-section__lead,
.as-about-section--intro p:not(.as-about-section__lead) {
    text-align: left;
}