/* ====================== */
/* ==== SECTIONS.CSS ==== */
/* ====================== */

/* ==== SHARED ==== */

/* ==== SECTION DIVIDER ==== */

.divider {
    width: 100%;
    height: 80px;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

.divider-top {
    background-image: url("/assets/images/decor/divider-top.svg");
}

.divider-bottom {
    background-image: url("/assets/images/decor/divider-bottom.svg");
    margin-bottom: -1px;
}

/* ==== BRUSH BOX ==== */
.brush-box {
    position: relative;
    background-color: var(--accent-highlight);
    overflow: hidden;
}

/* Top / Bottom */
.brush-box::before,
.brush-box::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 25px;
    background-image: url("/assets/images/decor/brushstroke-top-inner.svg");
    background-size: cover;
    background-repeat: no-repeat;
    pointer-events: none;
}

.brush-box::before {
    top: 0;
}

.brush-box::after {
    bottom: 0;
    transform: rotate(180deg);
}

/* Sides */
.brush-box .brush-left,
.brush-box .brush-right {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 20px;

    background-image: url("/assets/images/decor/brushstroke-side-inner.svg");
    background-repeat: repeat-y;
    background-size: 100% auto;

    pointer-events: none;
}

.brush-box .brush-left {
    left: 0;
}

.brush-box .brush-right {
    right: 0;
    transform: scaleX(-1);
}

/* ==== HEADER / NAV ==== */

.navbar {
    min-height: 40px;
}

.navbar-nav .nav-link {
    position: relative;
    padding-top: 10px;
    padding-bottom: 4px;
}

.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -11px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--accent-primary);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-family: var(--heading);
    font-size: 2.2rem;
    line-height: 1;
    color: var(--accent-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.navbar-brand:hover {
    color: var(--accent-primary);
}

.navbar a:hover {
    color: var(--accent-primary)
}

.navbar-nav .nav-link {
    position: relative;
}

.navbar-nav .nav-link.active {
    color: var(--accent-primary);
}

/* HAMBURGER */

.navbar-toggler {
    border: none;
    --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(144,184,84,1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.navbar-toggler[aria-expanded="true"] {
    --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(144,184,84,1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M6 6l18 18M6 24L24 6'/%3e%3c/svg%3e") !important;
}

/* Hover States */
@media (hover: hover) {

    .navbar-toggler[aria-expanded="false"]:hover {
        --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(253,184,88,1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    }

    .navbar-toggler[aria-expanded="true"]:hover {
        --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(253,184,88,1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M6 6l18 18M6 24L24 6'/%3e%3c/svg%3e") !important;
    }
}

/* ==== INTRO | HERO ==== */

.hero {
    background-image: url("/assets/images/decor/leopard-300px-121212.svg");
    min-height: 100vh;
}

.typewriter {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: 5px solid var(--accent-secondary);
    width: 0;
    animation:
        typing 6s steps(12) infinite,
        blink-caret .7s step-end infinite;
    transition: color 0.3s ease;
}

@keyframes typing {

    /* Pause: 0-40% (2.4s) */
    0%,
    40% {
        width: 0;
    }

    /* Type: 40-70% (1.8s) */
    40%,
    70% {
        width: 100%;
    }

    /* Visible: 70-100% (1.8s) */
    70%,
    100% {
        width: 100%;
    }
}

@keyframes blink-caret {

    from,
    to {
        border-color: transparent
    }

    50% {
        border-color: var(--accent-primary)
    }
}

.typewriter:hover {
    color: var(--accent-secondary);
    border-right-color: var(--accent-secondary);
    cursor: pointer;
}

.hero-image {
    width: 50%;
    height: auto;
    opacity: 0;
    transition: filter 0.4s ease;
    animation: fadeInBottom 1s ease 1s 1 normal forwards;
    cursor: pointer;
}

.hero-image:hover {
    filter: grayscale(100%);
    cursor: pointer;
}

@keyframes fadeInBottom {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero>a>i {
    font-size: 2rem;
    display: inline-block;
    opacity: 0;
    animation: bounceIn 1.5s ease 2s forwards;
    transition: color 0.3s ease;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: translateY(-45px);
    }

    60% {
        opacity: 1;
        transform: translateY(10px);
    }

    80% {
        transform: translateY(-5px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero>a>i:hover {
    color: var(--accent-primary);
    cursor: pointer;
}

/* HERO DIVIDER FIX */
.hero .divider-top {
    height: 120px;
    margin-top: 15px;
}

.hero .divider-bottom {
    margin-top: auto;
}

/* ==== ABOUT ME ==== */

.about h2 {
    color: var(--accent-muted);
}

.about .btn-primary {
    color: var(--accent-muted);
}

.stars-decoration {
    /* position: absolute; */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.star {
    position: absolute;
    width: 40px;
    height: auto;
    opacity: 1;
}

/* LEFT */
.star-left-1 {
    top: 20%;
    left: 5%;
}

.star-left-2 {
    top: 30%;
    left: 8%;
}

.star-left-3 {
    top: 50%;
    left: 3%;
}

.star-left-4 {
    top: 60%;
    left: 7%;
}

.star-left-5 {
    top: 80%;
    left: 4%;
}

/* RIGHT */
.star-right-1 {
    top: 20%;
    right: 6%;
}

.star-right-2 {
    top: 35%;
    right: 4%;
}

.star-right-3 {
    top: 50%;
    right: 8%;
}

.star-right-4 {
    top: 60%;
    right: 5%;
}

.star-right-5 {
    top: 70%;
    right: 7%;
}

.about .container-lg {
    position: relative;
    z-index: 2;
}

/* ==== SKILLS ==== */
.skills {
    background-image: url("/assets/images/decor/ransom-skills.svg");
    background-repeat: repeat;
}

.skill-rating i {
    color: var(--accent-muted);
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.skill-item img {
    width: 100%;
    height: auto;
}

.skill-item .skill-title {
    margin-top: 1rem;
    font-family: var(--font-accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ==== EXPERIENCE ==== */
.experience {
    background-image: url("/assets/images/decor/arrow-pattern.svg");
    background-repeat: repeat;
}

/* ==== PORTFOLIO ==== */
.portfolio {
    background-image: url("/assets/images/decor/safetypins.svg");
    background-repeat: repeat;
}

.portfolio-item {
    position: relative;
    display: block;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

/* TODO: BS-UTILITIES ? */
.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    transform: translateY(0);
    transition: transform 0.4s ease;
    pointer-events: none;
}

.portfolio-item img {
    transition: transform 0.4s ease;
}

.portfolio-item img:hover {
    transform: scale(1.05);
}

.portfolio-item:hover .portfolio-overlay,
.portfolio-item:focus-visible .portfolio-overlay {
    transform: translateY(0);
}

.portfolio-title {
    font-family: var(--heading);
    text-transform: uppercase;
    margin-bottom: .5rem;
}

.portfolio-text {
    font-size: .9rem;
    opacity: .85;
}

/* Bootstrap override */
.modal-fullscreen {
    width: 95vw;
    height: 95vh;
    max-width: none;
    border: 2px solid var(--accent-muted);
    margin: 0 auto;
}

.modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ==== DOCUMENTS ==== */

/* TODO: background-image responsive */
.documents {
    background-image: url("/assets/images/decor/bianca-halftone.svg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center right;
    bottom: 0;
    right: 0;
}

.documents .brush-box {
    background-color: #121212;
    color: var(--bs-light);
    transform: rotate(-1deg);
}

/* ==== CONTACT ==== */
/* TODO: background-image responsive */
.contact {
    background-image: url("/assets/images/decor/leopard-300px-121212.svg");
    background-repeat: no-repeat;
    background-size: cover;
    bottom: 0;
    right: 0;
}

/* ==== FOOTER ==== */

.site-footer a {
    color: var(--bs-light);
    text-decoration: none;
    font-size: 0.9rem;
}

.site-footer a:hover {
    color: var(--accent-primary);
}

.site-footer h4 {
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    opacity: 0.8;
}

.site-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bs-dark);
    color: var(--bs-light);
    transform: translateY(100%);
    transition: transform 0.4s ease;
    z-index: 900;
}

.site-footer.is-open {
    transform: translateY(0);
}

.footer-toggle {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: var(--bs-light);
    border: none;
    padding: 0.5rem 1.25rem 0.4rem;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    cursor: pointer;
}

.footer-toggle i {
    font-size: 1.2rem;
    line-height: 1;
}

.footer-toggle-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-left: 0.4rem;
    opacity: 0.8;
}


/* WIRKT WIE TO TOP! -- Styling merken -- */
/* .footer-toggle {
    position: fixed;
    bottom: 1rem;
    right: 1rem;

    background: rgba(0, 0, 0, 0.6);
    color: white;

    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;

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

    z-index: 1000;
    cursor: pointer;
} */

.footer-toggle:hover {
    background: rgba(0, 0, 0, 0.8);
}

.footer-bottom a {
    color: var(--bs-secondary);
    text-decoration: underline;
}

.footer-bottom a:hover {
    color: var(--bs-dark);
}

/* ==================== */
/* ==== RESPONSIVE ==== */
/* ==================== */

/* TODO: mobile menu */

@media (max-width: 767px) {

    /* SKILLS */
    .skill-item img {
        max-width: 100px;
    }

    /* PORTFOLIO */
    .portfolio-overlay {
        transform: translateY(0);
    }
}

@media (min-width: 768px) and (max-width: 991px) {

    /* SKILLS */
    .skill-item img {
        max-width: 120px;
    }
}

@media (min-width: 768px) {
    .hero-image {
        width: 20%;
    }
}

@media (hover: hover) and (pointer: fine) {
    .portfolio-overlay {
        transform: translateY(100%);
        transition: transform 0.4s ease;
    }

    .portfolio-item:hover .portfolio-overlay,
    .portfolio-item:focus-visible .portfolio-overlay {
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .portfolio-overlay {
        transition: none;
        transform: translateY(0);
        background: rgba(0, 0, 0, 0.85);
    }
}