/* =========================================================
   ANDY KING — Ghost theme  (minimal / Swiss)
   ========================================================= */

:root {
    --paper:   #ffffff;
    --ink:     #111111;
    --ink-soft:#8d8d88;
    --line:    #e4e4e1;
    --fill:    #ededea;
    --accent:  #FF2E63;            /* pink — overridden by settings */
    --scroll:  #1A23E0;            /* blue — overridden by settings */

    --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
    --pad: clamp(20px, 3vw, 44px);
    --side: clamp(220px, 20vw, 300px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.005em;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--accent); color: #fff; }

/* ===== full-screen, no page scroll — only on the home page ===== */
body.home-template { height: 100vh; height: 100dvh; overflow: hidden; }

.shell {
    display: flex;
    align-items: stretch;
    height: 100vh; height: 100dvh;
    padding: var(--pad);
    gap: clamp(20px, 3vw, 56px);
}

/* ============================== SIDEBAR ============================== */
.sidebar {
    flex: 0 0 var(--side);
    width: var(--side);
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.sidebar__top { display: flex; flex-direction: column; }
.sidebar__bottom { margin-top: auto; display: flex; flex-direction: column; gap: 2px; }

.brand {
    font-weight: 700;
    font-size: 1.06rem;
    letter-spacing: -0.015em;
    text-align: left;
    line-height: 1;
    transition: color .2s;
}
.brand:hover { color: var(--accent); }

.portrait { margin: 16px 0 0; }
.portrait img {
    width: min(210px, 100%);
    aspect-ratio: 3 / 2;
    object-fit: cover;
    background: var(--fill);
}

.works { margin-top: 26px; display: flex; flex-direction: column; }
.works__link {
    font-weight: 700;
    font-size: 1.06rem;
    line-height: 1.32;
    letter-spacing: -0.015em;
    transition: color .2s ease;
    width: fit-content;
}
.works__link:hover { color: var(--accent); }
.works__link.is-active { color: var(--accent); }

.meta-link {
    font-weight: 700;
    font-size: 1.02rem;
    letter-spacing: -0.01em;
    text-align: left;
    line-height: 1.3;
    transition: color .2s;
    width: fit-content;
}
.meta-link:hover { color: var(--accent); }

/* ============================== STAGE / GALLERY ============================== */
.stage {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.gallery {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    gap: clamp(8px, 0.8vw, 16px);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery.is-dragging { cursor: grabbing; }
.gallery:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.shot {
    flex: 0 0 auto;
    height: 100%;
    margin: 0;
    background: var(--fill);
    overflow: hidden;
    scroll-snap-align: start;
}
.shot img {
    height: 100%;
    width: auto;
    object-fit: cover;
    user-select: none;
    -webkit-user-drag: none;
}

/* ===== custom horizontal scrollbar ===== */
.bar {
    position: relative;
    height: 8px;
    margin-top: clamp(14px, 2.2vh, 26px);
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 16%, #fff);
    flex: 0 0 auto;
}
.bar__thumb {
    position: absolute;
    top: 0; left: 0;
    height: 100%;
    min-width: 28px;
    border-radius: 999px;
    background: var(--scroll);
    cursor: grab;
    transition: background .2s;
}
.bar__thumb:active { cursor: grabbing; }
.bar.is-hidden { display: none; }

/* ============================== INFO OVERLAY ============================== */
.info {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--pad);
    background: rgba(255,255,255,.82);
    backdrop-filter: blur(7px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s;
}
.info.is-open { opacity: 1; visibility: visible; }
.info__panel {
    position: relative;
    width: min(620px, 100%);
    max-height: 86vh;
    overflow-y: auto;
    background: var(--paper);
    border: 1px solid var(--ink);
    padding: clamp(28px, 4vw, 52px);
    transform: translateY(12px);
    transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.info.is-open .info__panel { transform: none; }
.info__close {
    position: absolute; top: 14px; right: 18px;
    font-size: 1.7rem; line-height: 1; color: var(--ink-soft);
    transition: color .2s;
}
.info__close:hover { color: var(--accent); }
.info__name { font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 700; letter-spacing: -0.02em; margin: 0 0 4px; }
.info__role { font-weight: 500; color: var(--ink-soft); margin: 0 0 24px; }
.info__bio p { margin: 0 0 1.1em; font-size: 1.02rem; line-height: 1.62; }
.info__bio em { font-style: italic; }
.info__links {
    margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line);
    display: flex; flex-wrap: wrap; gap: 22px; font-weight: 700; font-size: .98rem;
}
.info__links a { border-bottom: 2px solid transparent; padding-bottom: 1px; transition: border-color .2s; }
.info__links a:hover { border-color: var(--accent); }

/* ============================== READER (post / page) ============================== */
.reader { max-width: 720px; margin: 0 auto; padding: clamp(40px, 7vw, 90px) var(--pad); }
.reader__nav { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 56px; }
.reader__brand { font-weight: 700; font-size: 1.06rem; letter-spacing: -0.015em; }
.reader__back { font-weight: 700; font-size: .98rem; }
.reader__back:hover, .reader__brand:hover { color: var(--accent); }
.article__eyebrow { color: var(--ink-soft); font-weight: 500; margin: 0 0 14px; }
.article__title { font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.02; margin: 0 0 22px; }
.article__lede { font-size: 1.2rem; color: var(--ink-soft); margin: 0 0 30px; }
.article__feature { margin: 0 0 36px; }
.article__feature img { width: 100%; }
.article__body { font-size: 1.06rem; line-height: 1.7; }
.article__body p { margin: 0 0 1.3em; }
.article__body h2, .article__body h3 { font-weight: 700; letter-spacing: -0.02em; margin: 1.6em 0 .4em; }
.article__body a { border-bottom: 2px solid var(--accent); }
.article__body blockquote { margin: 1.4em 0; padding-left: 20px; border-left: 3px solid var(--accent); font-size: 1.25rem; font-weight: 600; }
.article__body img { width: 100%; margin: 1.4em 0; }

/* Koenig editor card widths (required by Ghost) */
.gh-content > * { max-width: 100%; }
.kg-width-wide { width: 100%; }
.kg-width-full { width: 100%; }
@media (min-width: 980px) {
    .kg-width-wide { width: calc(100% + 160px); margin-left: -80px; }
    .kg-width-full { width: calc(100vw - 2 * var(--pad)); position: relative; left: 50%; transform: translateX(-50%); }
}
.kg-gallery-container { display: flex; flex-direction: column; gap: 8px; margin: 1.4em 0; }
.kg-gallery-row { display: flex; gap: 8px; }
.kg-gallery-image img { width: 100%; height: 100%; object-fit: cover; }

/* ============================== RESPONSIVE ============================== */
@media (max-width: 760px) {
    body.home-template { height: auto; overflow: auto; }
    .shell { flex-direction: column; height: auto; min-height: 100dvh; gap: 22px; }
    .sidebar { flex-basis: auto; width: 100%; }
    .sidebar__bottom { margin-top: 24px; flex-direction: row; gap: 22px; }
    .works { margin-top: 18px; }
    .portrait img { width: 160px; }
    .stage { height: 70vh; }
    .gallery { scroll-snap-type: x mandatory; }
    .shot { scroll-snap-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
