/* ==========================================================================
   KobiJak — Main Site Styles
   Mobile-first, Bootstrap 5 overrides & custom styles
   ========================================================================== */

/* ---------- Brand Colors ---------- */
:root {
    --kj-black: #000000;
    --kj-green: #39B54A;
    --kj-grey: #999999;
    --kj-dark-grey: #222222;
    --kj-light-grey: #cccccc;
    --kj-white: #ffffff;
}

/* ---------- Base ---------- */
html {
    scroll-padding-top: 60px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--kj-black);
    color: var(--kj-grey);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
}

a {
    color: var(--kj-green);
    text-decoration: none;
}

a:hover {
    color: #2e9a3d;
}

/* ---------- Custom Buttons ---------- */
.btn-kj-green {
    background-color: var(--kj-green);
    color: var(--kj-white);
    border: none;
}

.btn-kj-green:hover {
    background-color: #2e9a3d;
    color: var(--kj-white);
}

/* ---------- Sidebar (Desktop) ---------- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 120px;
    height: 100vh;
    background-color: var(--kj-dark-grey);
    z-index: 1030;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
}

.sidebar img {
    width: 100%;
}

.sidebar .nav-link {
    color: var(--kj-grey);
    text-align: center;
    padding: 1rem 0.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    transition: color 0.2s, border-color 0.2s;
    border-left: 3px solid transparent;
    display: block;
    width: 100%;
}

.sidebar .nav-link:hover {
    color: var(--kj-white);
    border-left-color: var(--kj-grey);
}

.sidebar .nav-link.active {
    color: var(--kj-green);
    border-left-color: var(--kj-green);
}

.sidebar .nav-link i {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 0.25rem;
}

/* ---------- Main Content ---------- */
#main {
    margin-left: 120px;
}

@media (max-width: 767.98px) {
    .sidebar {
        display: none !important;
    }

    #main {
        margin-left: 0;
        padding-top: 48px;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* ---------- Mobile Navbar ---------- */
.mobile-navbar {
    background-color: rgba(0, 0, 0, 0.9);
}

.mobile-navbar .nav-link {
    color: var(--kj-grey);
    font-size: 0.75rem;
    padding: 0.75rem 0.5rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.mobile-navbar .nav-link:hover,
.mobile-navbar .nav-link.active {
    color: var(--kj-white);
}

.mobile-navbar .nav-link .fa-circle-user {
    font-size: 1.3rem;
    padding: 0.25rem;
}

/* ---------- Hero Section ---------- */
.hero-section {
    overflow: hidden;
    position: relative;
}

.hero-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--kj-white);
}

.hero-section .hero-subtitle {
    color: var(--kj-grey);
    position: relative;
    z-index: 2;
}

.hero-section .hero-img {
    margin-top: -30px;
    position: relative;
    z-index: 1;
    max-width: 60%;
}

@media (max-width: 767.98px) {
    .hero-section {
        padding-bottom: 0 !important;
    }

    .hero-section h1 {
        font-size: 2.25rem;
    }

    .hero-section .hero-img {
        max-width: 100%;
        width: 100%;
        height: 55vh;
        object-fit: cover;
        margin-top: -10px;
        margin-left: -1rem;
        margin-right: -1rem;
        width: calc(100% + 2rem);
        border-radius: 0;
    }

    #about {
        padding-top: 2rem !important;
    }
}

@media (min-width: 768px) {
    .hero-section h1 {
        font-size: 4rem;
    }
}

/* ---------- Section Headings ---------- */
.section-heading {
    color: var(--kj-light-grey);
}

.section-divider {
    width: 200px;
    margin: 0 auto;
    border-color: var(--kj-grey);
    opacity: 0.5;
}

/* ---------- Skills Progress Bars ---------- */
.skill-label {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.9rem;
}

.progress {
    height: 28px;
    background-color: var(--kj-white);
    border-radius: 0;
}

.progress-bar {
    background-color: var(--kj-green);
    transition: width 2s ease-in-out;
}


/* ---------- YouTube Embed ---------- */
.youtube-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
}

.youtube-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ---------- Photo Gallery (Bento Grid) ---------- */
.gallery-bento {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 160px;
    grid-auto-flow: dense;
    gap: 8px;
}

@media (min-width: 576px) {
    .gallery-bento { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 180px; }
}

@media (min-width: 992px) {
    .gallery-bento { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; }
}

.gallery-bento .bento-hero { grid-column: span 2; grid-row: span 2; }
.gallery-bento .bento-tall { grid-row: span 2; }
.gallery-bento .bento-wide { grid-column: span 2; }

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.gallery-img.visible {
    opacity: 1;
    transform: scale(1);
}

.gallery-img:hover {
    opacity: 0.85;
}

/* ---------- Photo Lightbox ---------- */
.gallery-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
}

.gallery-lightbox.open {
    display: flex;
}

.gallery-lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 8px;
    object-fit: contain;
}

.lb-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    width: 48px;
    height: 64px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.lb-nav:hover { background: rgba(255, 255, 255, 0.2); }
.lb-prev { left: 1rem; }
.lb-next { right: 1rem; }

/* ---------- Contact Section ---------- */
.contact-info p {
    display: flex;
    align-items: center;
}

.contact-info i {
    color: var(--kj-white);
    font-size: 1.25rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

/* ---------- Footer ---------- */
footer {
    text-align: center;
}

.footer-social a {
    color: var(--kj-grey);
    font-size: 1.5rem;
    margin-right: 1rem;
    transition: opacity 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}

.footer-social a:hover {
    opacity: 0.7;
}

/* ---------- Spelling Stars Promo Section ---------- */
.spelling-stars-promo {
    background: linear-gradient(135deg, var(--kj-dark-grey) 0%, #1c1c1c 100%);
    border-radius: 1rem;
    overflow: hidden;
}

.spelling-stars-promo .star-icon {
    color: #D4A017;
    font-size: 2rem;
}

@media (min-width: 768px) {
    .spelling-stars-promo .star-icon {
        font-size: 3rem;
    }
}

/* ---------- Back to Top ---------- */
.back-to-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--kj-grey);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, background-color 0.15s;
    z-index: 1020;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    animation: bttPulse 1s ease-in-out 3;
}

.back-to-top:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--kj-white);
}

@keyframes bttPulse {
    0%, 100% { box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4); }
    50% { box-shadow: 0 2px 16px rgba(255, 255, 255, 0.15), 0 0 0 6px rgba(255, 255, 255, 0.05); }
}

@media (max-width: 767.98px) {
    .back-to-top {
        bottom: 2.5rem;
    }
}
