:root {
    --brand-color: rgba(0, 0, 0, 1);
}

/* HERO */
.hero {
    height: 100vh;
    background: url('/images/hero.png') center/contain no-repeat;
    position: relative;
    transition: opacity 0.4s ease;
}

.hero-overlay {
    position: absolute;
    inset: 0;

    display: flex;
    flex-direction: column;

    justify-content: flex-start;
    align-items: center;

    padding-top: clamp(80px, 12vh, 160px);
    text-align: center;
    color: white;
}
.hero-overlay h1 {
    font-weight: 200;
    font-size: clamp(1.8rem, 4.5vw, 3.5rem);
}

.hero-overlay h2 {
    font-weight: 300;
    font-size: clamp(1.1rem, 2.2vw, 1.8rem);
}
.hero-divider {
    width: 220px;
    height: 3px !important;
    border: none;

    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(255,255,255,1) 25%,
        rgba(255,255,255,1) 75%,
        transparent 100%
    );
}

/* overlay layer */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45); /* adjust darkness here */
}

/* HEADER TRANSITION */
.site-header.scrolled {
    background-color: var(--brand-color)!important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}

body.home .site-header .bg-black {
    background: transparent !important;
}
/* END HERO */

.site-footer {
    background-color: var(--brand-color);
}

.content {
    padding: 0 2.5rem;
    background: rgba(255,255,255,1);
}

.logo {
    height: 50px;   /* adjust: 24–40px typical */
    width: auto;
}

.img-responsive {
    max-width: 300px;
    width: 100%;
    height: auto;
}


.content-divider {
    border: none;
    height: 1px;
    background: rgba(0, 0, 0, 0.5);
    margin: 2.5rem auto;
    width: 100%;
}

ul {
    display: inline-block;
    text-align: left;
}

.rss-link {
    color: white-80;
    margin-right: 0.75rem;
}
.ananke-socials img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: invert(1);
}
/* hover effect */
.social-link:hover .social-icon {
    opacity: 1;
    color: white-80;
}

.app-store-badge {
    width: 180px;
    max-width: 100%;
    height: auto;
}

/* Language switcher */

.language-switcher {
    opacity: 0.65;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.language-switcher a {
    padding: 2px 6px;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 999px;
}

.language-switcher:hover {
    opacity: 1;
}
/* End Language switcher */

/* offset for the header height */
body.page main {
    padding-top: 3rem; /* adjust to your header height */
}

/* Use full page width */
.measure-wide,
.measure,
.measure-wide-l {
    max-width: 100% !important;
}


/* NAV BASE */
.nav {
    width: 100%;
    padding: 0.8rem 1.5rem;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
}

/* LOGO */
.nav-logo img {
    height: 40px;
}

/* RIGHT SIDE */
.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Desktop menu */
.nav-menu {
    display: flex;
    gap: 1.2rem;
    margin-left: auto;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 400;
}

.nav-link:hover {
    color: rgba(255,255,255,0.8);
}

/* =========================
 *  DROPDOWN BASE SYSTEM
 *  ========================= */

/* IMPORTANT: positioning anchor */
li.relative {
    position: relative;
}

/* base dropdown */
li.relative > .dropdown {
    position: absolute !important;
    top: 100%;
    left: 0;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    z-index: 999;

    min-width: 160px;

    transition: opacity 0.2s ease, transform 0.2s ease;
    transform: translateY(6px);
}

/* show dropdown */
li.relative:hover > .dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

/* =========================
 *  THEME VARIANTS
 *  ========================= */

.site-header li.relative > .dropdown {
    background: var(--brand-color);
    backdrop-filter: none;
    border: none;
}

/* /* ONLY homepage + NOT scrolled overrides the above */ */
body.home .site-header:not(.scrolled) li.relative > .dropdown {
    background: rgba(224, 99, 71, 0.22);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
}

/* =========================
 *  DROPDOWN ITEMS
 *  ========================= */

.dropdown li {
    list-style: none;
}

.dropdown a {
    display: block;
    padding: 0.4rem 1rem;
    text-decoration: none;
    color: white;
    white-space: nowrap;
}

.dropdown a:hover {
    background: rgba(255,255,255,0.1);
}

/* =========================
 *  CARET
 *  ========================= */

.caret {
    font-size: 0.7em;
    line-height: 1;
}

/* =========================
 *  Codefile shortcode
 *  ========================= */
.codefile {
    margin: 1.5rem 0;
    border-radius: 8px;
    overflow: hidden;
    background: #1e1e1e;
}

.codefile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--brand-color);
    color: white;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

.codefile button {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 0.2rem 0.5rem;
    cursor: pointer;
    border-radius: 4px;
}

.codefile button:hover {
    background: rgba(255,255,255,0.35);
}

#lightbox {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.9);
display: none;
align-items: center;
justify-content: center;
z-index: 9999;
}

#lightbox img {
max-width: 90%;
max-height: 90%;
}

#lightbox.active {
display: flex;
cursor: zoom-out;
}

/* ===== HAMBURGER ===== */
.nav-toggle {
    display: none;
    font-size: 1.8rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    margin-left: auto;
}

/* ===== DESKTOP ===== */
.nav-menu {
    display: flex;
    margin-left: auto;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {

    .nav-inner {
        position: relative;
    }

    .nav-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        position: absolute;

        top: 100%;
        right: 0;     /* KEY */
        left: auto;   /* IMPORTANT */

        width: auto;  /* KEY FIX */
        min-width: 180px;

        background: var(--brand-color);
        padding: 1rem;

        flex-direction: column;
        align-items: flex-end;

        z-index: 9999;
    }

    .nav-menu ul {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;

        margin: 0;
        padding: 1rem;
    }

    .nav-menu.open {
        display: block;
    }

    .hero {
        background: url('/images/hero-mobile.png') center/cover no-repeat;
    }
}
