/* ========== TOKENS ========== */
:root {
    --ink: #ece6da;
    --muted: #a89e8e;
    --paper: #171512;
    --hairline: rgba(255, 255, 255, 0.12);
    --brass: #c99b64;
    --charcoal: #1e1c1a;

    --font-display: "Fraunces", Georgia, serif;
    --font-body: "Inter", Arial, sans-serif;

    --sidebar-width: 36vw;
    --ticker-height: 40px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--paper);
    position: relative;
}

/* Same photo as the sidebar, blurred and darkened, fixed behind the
   entire page so the content pane reads as a continuation of the
   sidebar rather than a bright wall butted up against it. */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url("images/background.jpg") center / cover no-repeat;
    filter: blur(50px) brightness(0.3) saturate(1.1);
    z-index: -1;
}

img {
    max-width: 100%;
    display: block;
}

/* ========== SIDEBAR ========== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    padding: 60px 48px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;

    background:
        linear-gradient(180deg, rgba(20, 18, 16, 0.55) 0%, rgba(20, 18, 16, 0.82) 75%),
        url("images/background.jpg") center / cover no-repeat;
}

.sidebar-top .avatar {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.7);
    margin-bottom: 28px;
}

.sidebar-top h1 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 2.2rem;
    line-height: 1.15;
    margin: 0 0 12px;
}

.sidebar-top .tagline {
    font-size: 1.05rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.82);
    max-width: 30ch;
    margin: 0;
}

.sidebar-bottom p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* ========== NEWS TICKER ========== */
/* Sits above the content pane only (never over the sidebar). Fixed
   on desktop so it stays visible while the content scrolls; becomes
   a normal static bar above the content on narrow screens, where the
   sidebar itself is no longer fixed. */
.news-ticker {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--ticker-height);
    z-index: 500;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: rgba(23, 21, 18, 0.94);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--hairline);
}

.news-ticker__track {
    display: flex;
    white-space: nowrap;
    will-change: transform;
    animation: news-ticker-scroll 60s linear infinite;
}

.news-ticker:hover .news-ticker__track {
    animation-play-state: paused;
}

.news-ticker__item {
    display: inline-flex;
    align-items: center;
    gap: 0.6em;
    padding: 0 2.4em;
    font-size: 0.82rem;
    letter-spacing: 0.01em;
    color: var(--ink);
    text-decoration: none;
    cursor: default;
}

a.news-ticker__item {
    cursor: pointer;
}

a.news-ticker__item:hover {
    color: var(--brass);
}

.news-ticker__item::before {
    content: "\25CF";
    color: var(--brass);
    font-size: 0.5em;
}

.news-ticker__source {
    color: var(--brass);
    font-weight: 500;
    font-size: 0.72em;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-right: 0.2em;
}

@keyframes news-ticker-scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .news-ticker__track {
        animation: none;
        overflow-x: auto;
    }
}

/* ========== MAIN CONTENT ========== */
.content {
    margin-left: var(--sidebar-width);
    padding: calc(90px + var(--ticker-height)) 8vw 60px;
    max-width: 900px;
}

.intro h2 {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 2.4rem;
    line-height: 1.25;
    max-width: 18ch;
    margin: 0 0 24px;
    color: var(--ink);
}

.intro p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--muted);
    max-width: 62ch;
    margin: 0 0 40px;
}

.hero-image {
    width: 100%;
    border-radius: 18px;
    cursor: pointer;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

/* ========== FRIENDS ========== */
.friends {
    margin-top: 90px;
    padding-top: 50px;
    border-top: 1px solid var(--hairline);
}

.friends h2 {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.6rem;
    margin: 0 0 40px;
    color: var(--ink);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 36px;
    row-gap: 48px;
}

figure {
    margin: 0;
}

.frame {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: 14px;
    overflow: hidden;
    isolation: isolate;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.frame:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.4);
}

/* A soft dark scrim behind any letterboxed space, so odd-shaped
   photos sit on something quiet rather than the busy page backdrop
   showing straight through. */
.frame::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(8, 7, 6, 0.4);
    z-index: 0;
}

.frame img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: pointer;
    filter: grayscale(15%);
    transition: filter 0.25s ease;
}

.frame img:hover {
    filter: grayscale(0%);
}

figcaption {
    margin-top: 14px;
    font-family: var(--font-display);
    font-size: 1.05rem;
    color: var(--ink);
}

/* ========== FOOTER ========== */
.content-footer {
    margin-top: 90px;
    padding-top: 24px;
    border-top: 1px solid var(--hairline);
}

.content-footer p {
    font-size: 0.9rem;
    color: var(--muted);
    margin: 0;
}

/* ========== LIGHTBOX ========== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(15, 13, 11, 0.92);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    cursor: zoom-out;
}

.lightbox img {
    max-width: 88%;
    max-height: 88%;
    border-radius: 4px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
    :root {
        --sidebar-width: 100%;
    }

    .sidebar {
        position: static;
        min-height: 340px;
        padding: 40px 28px;
    }

    .news-ticker {
        position: static;
        left: 0;
        right: 0;
        width: 100%;
    }

    .content {
        margin-left: 0;
        padding: 50px 6vw 50px;
    }

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

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    figure img,
    .frame {
        transition: none;
    }
}
