@font-face {
    font-family: 'Merriweather';
    src: url('../fonts/merriweather-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/montserrat-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* ── Skip link (accessibility) ── */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    padding: 0.5rem 1rem;
    background: #bf0000;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    text-decoration: none;
    z-index: 9999;
    transition: top 0s;
}
.skip-link:focus {
    top: 0;
}

/* ── Focus indicators ── */
:focus-visible {
    outline: 2px solid #bf0000;
    outline-offset: 3px;
}
a:focus-visible,
button:focus-visible {
    outline: 2px solid #bf0000;
    outline-offset: 3px;
    border-radius: 2px;
}

html,
body {
    height: 100%;
}
body {
    background: #1a1a1a;
    color: #eaeaea;
    font-family: 'Merriweather', serif;
    margin: 0;
    min-width: 320px;
}
a {
    color: #fff;
    text-decoration: underline;
}
a:hover {
    color: #fff;
    text-decoration: none;
}

/* Content body links — white text, red underline */
.site-content a:not([class]) {
    color: #eaeaea;
    text-decoration: underline;
    text-decoration-color: #bf0000;
}
.site-content a:not([class]):hover {
    color: #fff;
    text-decoration-color: #bf0000;
}
h1, h2, h3, h4, h5 {
    font-family: 'Montserrat', serif;
    font-weight: normal;
}
h1 {
    font-size: 1.4rem;
}
h2 {
    font-size: 1.1rem;
}
dl {
    margin-bottom: 30px;
}
dd {
    color: #999;
}
dt,
dd {
    margin: 0;
    padding: 0;
}

/* ── Top Header ── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #252525;
    border-bottom: 1px solid #333;
}
.site-header__inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 2rem;
    height: 60px;
    max-width: 1280px;
    margin: 0 auto;
}
.site-header__logo {
    font-family: 'Montserrat', sans-serif;
    font-weight: normal;
    font-size: 0.85rem;
    color: #eaeaea;
    text-decoration: none;
    border-bottom: 1px solid #bf0000;
    padding-bottom: 1px;
    white-space: nowrap;
    flex-shrink: 0;
}
.site-header__logo:hover {
    border-bottom-color: #fff;
    color: #fff;
}
.site-header__nav {
    display: flex;
    gap: 1rem;
    flex: 1;
}
.nav-link {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    color: #999;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    padding-bottom: 1px;
    transition: color 0.2s, border-color 0.2s;
    letter-spacing: 0.03em;
}
.nav-link:hover,
.nav-link.active {
    color: #eaeaea;
    border-bottom-color: #bf0000;
}
.site-header__social {
    display: flex;
    gap: 1rem;
    margin-left: auto;
    flex-shrink: 0;
}
.social-icon {
    display: flex;
    align-items: center;
    color: #999;
    text-decoration: none;
    transition: color 0.2s;
}
.social-icon:hover {
    color: #eaeaea;
}

/* ── Main content ── */
.site-main {
    min-height: calc(100vh - 60px);
}
.site-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* ── Page intro text ── */
.page-intro {
    color: #999;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    margin: -0.5rem 0 2rem 0;
    line-height: 1.7;
}
.page-intro a {
    color: #999;
}
.page-intro a:hover {
    color: #eaeaea;
}

/* ── Playground page ── */
.playground-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 2rem;
}
.playground-card {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    background: #252525;
    border: 1px solid #333;
    border-left: 3px solid #bf0000;
    padding: 1.5rem 2rem;
    text-decoration: none;
    color: #eaeaea;
    transition: border-color 0.2s, background 0.2s;
    min-width: 260px;
}
.playground-card:hover {
    background: #2e2e2e;
    border-color: #bf0000;
    color: #fff;
}
.playground-card__icon {
    color: #bf0000;
    flex-shrink: 0;
}
.playground-card h2 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    color: #eaeaea;
}
.playground-card p {
    margin: 0;
    font-size: 0.8rem;
    color: #999;
    font-family: 'Montserrat', sans-serif;
}
.playground-card:hover h2 {
    color: #fff;
}

.site-footer {
    background: #252525;
    border-top: 1px solid #333;
    text-align: center;
    padding: 2rem;
    font-family: 'Montserrat', sans-serif;
}
.site-footer__tagline {
    margin: 0 0 0.4rem 0;
    font-size: 0.8rem;
    color: #eaeaea;
    letter-spacing: 0.04em;
}
.site-footer__copy {
    margin: 0;
    font-size: 0.7rem;
    color: #666;
}

@media (max-width: 768px) {
    .site-header__inner {
        padding: 0 1rem;
    }
    .site-content {
        padding: 2rem 1rem;
    }
    .playground-card {
        width: 100%;
    }
}

/* ── Instagram feed page ── */
.ig-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
}
@media (max-width: 900px) {
    .ig-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
    .ig-grid { grid-template-columns: repeat(2, 1fr); }
}
.ig-item {
    position: relative;
    overflow: hidden;
    background: #000;
}
.ig-item::before {
    content: '';
    display: block;
    padding-top: 125%;
}
.ig-item a {
    position: absolute;
    inset: 0;
    display: block;
    text-decoration: none;
}
.ig-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s;
}
.ig-item:hover img { opacity: 0.6; }
.ig-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 12px;
    background: linear-gradient(transparent 40%, rgba(0,0,0,0.75));
    opacity: 0;
    transition: opacity 0.3s;
}
.ig-item:hover .ig-overlay { opacity: 1; }
.ig-caption {
    color: #eaeaea;
    font-family: 'Merriweather', serif;
    font-size: 11px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    overflow: hidden;
    margin-bottom: 4px;
}
.ig-date {
    color: #999;
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
}
.ig-play-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    pointer-events: none;
    line-height: 0;
}
.ig-empty {
    color: #999;
    font-family: 'Montserrat', sans-serif;
    text-align: center;
    padding: 60px 0;
}

/* ─────────────────────────────────────────────
   PAGE HERO — shared title/intro component
   ───────────────────────────────────────────── */

@keyframes hero-title-in {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes hero-intro-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.page-hero {
    padding-bottom: 2.5rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid #252525;
}

.page-hero__title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: clamp(2.6rem, 6vw, 5rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin: 0 0 1.25rem 0;
    color: #eaeaea;
    opacity: 0;
    animation: hero-title-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.05s forwards;
}

.page-hero__title-text {
    display: inline;
}
.page-hero__title-text::after {
    content: '.';
    color: #bf0000;
}

.page-hero__intro {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    color: #999;
    line-height: 1.75;
    margin: 0;
    max-width: 55ch;
    opacity: 0;
    animation: hero-intro-in 0.5s ease 0.35s forwards;
}

.page-hero__intro a {
    color: #999;
    text-decoration: underline;
}

.page-hero__intro a:hover {
    color: #eaeaea;
    text-decoration: none;
}

/* Per-page typographic variations */
#page-home .page-hero__title { letter-spacing: -0.025em; }
#page-home .page-hero__title-text::after { content: '!'; }

#page-about .page-hero__title { letter-spacing: -0.03em; }

#page-instagram .page-hero__title {
    font-size: clamp(2rem, 4.5vw, 4rem);
    letter-spacing: 0;
}

#page-playground .page-hero__title { letter-spacing: 0.01em; }

/* Secondary section heading (e.g. "Diverse" on About page) */
.section-heading {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 1.1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #666;
    margin: 3rem 0 1.25rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #252525;
}

@media (max-width: 768px) {
    .page-hero {
        padding-bottom: 1.75rem;
        margin-bottom: 1.75rem;
    }
    .page-hero__title { margin-bottom: 1rem; }
    #page-instagram .page-hero__title { font-size: clamp(1.75rem, 6vw, 3rem); }
}

@media (prefers-reduced-motion: reduce) {
    .page-hero__title,
    .page-hero__intro {
        animation: none;
        opacity: 1;
        transform: none;
    }
}
