/* Global header height (for fixed navbar offset) */
:root {
    --site-header-height: 80px;
}

/* Fixed top navbar (logo + menus) */
.notebook-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(to bottom, #f5f0e6 0%, #ebe4d8 100%);
    background-image:
        linear-gradient(to bottom, rgba(0,0,0,.06) 1px, transparent 1px),
        linear-gradient(to bottom, #f5f0e6 0%, #ebe4d8 100%);
    background-size: 100% 28px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

/* Ensure page content isn't hidden behind fixed navbar */
body {
    padding-top: var(--site-header-height);
}

@media (max-width: 767px) {
    :root { --site-header-height: 76px; }
}

/* Global safety for responsive layouts */
*,
*::before,
*::after {
    box-sizing: border-box;
}
img,
video,
canvas,
svg {
    max-width: 100%;
    height: auto;
}
/* Banner: watercolor hero */
.watercolor-hero {
    background: linear-gradient(135deg, #c5dce8 0%, #b8d4e3 30%, #e2eef5 70%, #d4e5ed 100%);
    position: relative;
    overflow: hidden;
}
.watercolor-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400' viewBox='0 0 400 400'%3E%3Cpath fill='%239bb8d4' fill-opacity='0.06' d='M0 200 Q100 150 200 200 T400 200 L400 400 L0 400 Z'/%3E%3Cpath fill='%237ba3c4' fill-opacity='0.05' d='M0 250 Q150 180 300 250 L400 200 L400 400 L0 400 Z'/%3E%3C/svg%3E");
    background-size: 600px 600px;
    pointer-events: none;
}
.cursive-overlay {
    position: absolute;
    inset: 0;
    opacity: 0.07;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='80'%3E%3Ctext x='10' y='40' font-family='cursive' font-size='18' fill='%231a365d'%3Ehandwriting skill%3C/text%3E%3C/svg%3E") repeat;
    pointer-events: none;
}
.torn-paper-btn {
    background: linear-gradient(145deg, #f5f0e6 0%, #e8e0d2 100%);
    box-shadow:
        2px 2px 4px rgba(0,0,0,.1),
        inset 0 1px 0 rgba(255,255,255,.8);
    border: 1px solid rgba(0,0,0,.08);
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}
.torn-paper-btn:hover {
    background: linear-gradient(145deg, #ebe4d8 0%, #ddd4c4 100%);
    box-shadow: 3px 3px 8px rgba(0,0,0,.12);
}
.hero-gradient { background: linear-gradient(135deg, #f1943e 0%, #0ea5e9 50%, #d946ef 100%); }
.section-gradient { background: linear-gradient(135deg, #fef7ee 0%, #e0f2fe 100%); }
.handwriting-bg { background: linear-gradient(135deg, #f6ba76 0%, #f0f9ff 100%); }
.martialarts-bg { background: linear-gradient(135deg, #7dd3fc 0%, #fae8ff 100%); }
.card-hover { transition: all 0.3s ease; }
.card-hover:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.floating { animation: floating 3s ease-in-out infinite; }
@keyframes floating {
    0% { transform: translate(0, 0px); }
    50% { transform: translate(0, 15px); }
    100% { transform: translate(0, -0px); }
}
@media (hover: hover) {
    .card-hover:hover {
        transform: translateY(-10px);
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    }
}
@media (max-width: 767px) {
    #nav-menu.mobile-open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(to bottom, #f5f0e6 0%, #ebe4d8 100%);
        border-bottom: 1px solid rgba(0,0,0,.08);
        box-shadow: 0 10px 25px rgba(0,0,0,.12);
        padding: 1rem 1.5rem;
        gap: 0;
        z-index: 100;
    }
    #nav-menu.mobile-open a {
        padding: 0.75rem 0;
        min-height: 44px;
        display: flex;
        align-items: center;
        border-bottom: 1px dashed rgba(0,0,0,.1);
    }
    #nav-menu.mobile-open a:last-child { border-bottom: none; }
}
