﻿/* ============================================================
   StudyBuddy — LAYOUT
   The shared app shell: top nav bar (with the daily streak
   counter), the centered content well, and the footer.
   Every page reuses this file, so the chrome stays identical.
   ============================================================ */

.app {
    min-height: 100dvh;
    display: grid;
    grid-template-rows: auto 1fr auto; /* nav · content · footer */
}

/* ---------------- top navigation ---------------- */
.nav {
    background: rgb(63 140 140 / 0.92);
    color: var(--on-dark);
    border-bottom: 1px solid var(--ink-line);
    position: sticky;
    top: 0;
    z-index: 40;
    overflow: hidden;
}

.nav-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    height: 90px;
    box-sizing: border-box;
}
/* brand */
.brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    height: 100%;
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.08rem;
    color: var(--on-dark);
    letter-spacing: -.02em;
    margin-right: .25rem;
}

    .brand:hover {
        text-decoration: none;
    }

    .brand .mark {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 100%;
    }

        .brand .mark img {
            max-height: 100%;
            width: auto;
            display: block;
        }



/* primary links */
.nav-links {
    display: flex;
    align-items: center;
    gap: .15rem;
    margin-right: auto;
}

.nav-link {
    color: rgb(0,0, 0);
    font-weight: 500;
    font-size: .92rem;
    padding: .45rem .75rem;
    border-radius: var(--r-sm);
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    transition: background .15s ease, color .15s ease;
}

    .nav-link:hover {
        color: var(--on-dark);
        background: rgba(255,255,255,.06);
        text-decoration: none;
    }

    .nav-link[aria-current="page"] {
        color: #fff;
        background: rgba(255,255,255,.1);
    }

    .nav-link .ic {
        font-size: 1rem;
        line-height: 1;
    }

/* ---------------- streak counter ---------------- */
.streak {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    background: rgba(245,158,11,.12);
    border: 1px solid rgba(245,158,11,.32);
    color: #FFD78A;
    padding: .4rem .7rem .4rem .55rem;
    border-radius: 999px;
    font-weight: 700;
    cursor: default;
    user-select: none;
}

    .streak .flame {
        font-size: 1.15rem;
        line-height: 1;
        filter: drop-shadow(0 0 6px rgba(245,158,11,.55));
        animation: flicker 2.4s ease-in-out infinite;
    }

    .streak .count {
        font-family: var(--mono);
        font-size: 1.02rem;
        letter-spacing: -.02em;
    }

    .streak .lbl {
        font-size: .68rem;
        font-weight: 600;
        color: var(--on-dark-mut);
        letter-spacing: .04em;
        text-transform: uppercase;
    }

    .streak.is-cold {
        background: rgba(255,255,255,.05);
        border-color: var(--ink-line);
        color: var(--on-dark-mut);
    }

        .streak.is-cold .flame {
            filter: none;
            opacity: .55;
            animation: none;
        }

@keyframes flicker {
    0%,100% {
        transform: rotate(-3deg) scale(1);
    }

    50% {
        transform: rotate(3deg) scale(1.08);
    }
}

/* ---------------- content well ---------------- */
.main {
    width: 100%;
}

.wrap {
    max-width: 1140px;
    margin: 0 auto;
    padding: 2.4rem 1.25rem 3.5rem;
}

    .wrap.narrow {
        max-width: 820px;
    }

/* page header block */
.page-head {
    margin-bottom: 1.8rem;
}

    .page-head h1 {
        font-size: clamp(1.7rem, 3.4vw, 2.3rem);
    }

    .page-head p {
        color: var(--muted);
        max-width: 60ch;
        margin-top: .5rem;
    }

/* ---------------- footer ---------------- */
.foot {
    border-top: 1px solid var(--line);
    background: var(--surface);
}

.foot-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 1.2rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-size: .82rem;
    color: var(--muted);
    flex-wrap: wrap;
}

    .foot-inner .mono {
        font-family: var(--mono);
    }

/* ---------------- responsive nav ---------------- */
@media (max-width: 720px) {
    .nav-inner {
        flex-wrap: wrap;
        row-gap: .5rem;
        padding: .6rem 1rem;
    }

    .brand {
        order: 1;
    }

    .streak {
        order: 2;
        margin-left: auto;
    }

    .nav-links {
        order: 3;
        width: 100%;
        margin-right: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 2px;
    }

    .nav-link {
        white-space: nowrap;
    }

    .streak .lbl {
        display: none;
    }

    .wrap {
        padding: 1.8rem 1rem 3rem;
    }
}
.foot-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 0.5rem;
}

    .foot-links a {
        color: #ff4fd8;
        text-decoration: none;
        font-weight: 600;
        transition: 0.2s ease;
    }

        .foot-links a:hover {
            color: #7b2cff;
            text-shadow: 0 0 10px rgba(255, 0, 180, 0.3);
        }

.your-name {
    color: var(--muted);
    font-weight: 500;
}
.icon-link {
    margin-left: auto;
    padding: .45rem .75rem;
}