/* ── 1. Explicit LTR ─────────────────────────────────────── */

html,
body {
    direction: ltr;
    text-align: left;
}


/* ── 2. Sidebar toggle ───────────────────────────────────── */

.sidebar__additional-info.js-show {
    display: block !important;
}


/* Sidebar btn: keep right-side placement (LTR) */

.sidebar__btn {
    right: 0;
    left: auto;
    border-top-left-radius: 0;
    border-top-right-radius: var(--radius-14);
    border-bottom-left-radius: var(--radius-14);
    border-bottom-right-radius: 0;
}


/* ── 3. Content area padding (clears absolute nav) ───────── */

.content {
    padding-top: 5rem;
}

@media only screen and (max-width: 991px) {
    /* Nav moves to bottom on tablet/mobile — clear bottom instead */
    .content {
        padding-top: 1.25rem;
        padding-bottom: 4.5rem;
    }
}


/* ── 4. Navigation ───────────────────────────────────────── */


/* nav-container is position:absolute top-right in LTR */

.nav {
    padding-left: 0;
}

.nav-container {
    right: 0;
    left: auto;
    border-radius: 0 var(--radius-20) 0 var(--radius-20);
}

@media only screen and (max-width: 991px) {
    .nav-container {
        right: 0;
        left: 0;
        border-radius: var(--radius-20) var(--radius-20) 0 0;
    }
}

.nav__item {
    margin-right: 2.75rem;
    margin-left: 0;
}

@media only screen and (max-width: 991px) {
    .nav__item {
        margin-right: 2rem;
    }
}

@media only screen and (max-width: 580px) {
    .nav__item {
        margin-right: 1.25rem;
    }
}

.nav__item:last-child {
    margin-right: 0;
}


/* ── 5. Icon box: icon on the LEFT of the text in LTR ────── */

.icon-box {
    margin-right: 1rem;
    margin-left: 0;
}


/* ── 6. Title underline bar starts from the left ─────────── */

.title__separate::before {
    left: 0;
    right: auto;
}


/* ── 7. Details info list ────────────────────────────────── */

.details-info {
    padding-left: 0;
    padding-right: 0;
}


/* ── 8. Timeline: left-side bar ──────────────────────────── */

.timeline {
    padding-left: 1.5rem;
    padding-right: 0;
}

.timeline::before {
    border-left-color: var(--color-border);
    border-left-width: 1px;
    border-left-style: solid;
    border-right: none;
}

.timeline__item {
    border-left-color: var(--color-border);
    border-left-width: 1px;
    border-left-style: solid;
    border-right: none;
    padding-left: 2.5rem;
    padding-right: 0;
}

.timeline__item::before {
    left: -0.3125rem;
    right: auto;
}

@media only screen and (max-width: 580px) {
    .timeline {
        padding-left: 0.90625rem;
    }
    .timeline__item {
        padding-left: 1.875rem;
    }
    .timeline__item::before {
        left: -0.21875rem;
        right: auto;
    }
}


/* ── 9. Case items (services): icon left, text right ─────── */

.case-item__icon {
    margin-right: 1rem;
    margin-left: 0;
}

@media only screen and (max-width: 580px) {
    .case-item__icon {
        margin-right: 0;
        margin-left: 0;
        margin-bottom: 0.8125rem;
    }
}


/* ── 10. Back to top: bottom-right ──────────────────────── */

.back-to-top {
    right: 2.5rem;
    left: auto;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}


/* ── 11. Portfolio filter ────────────────────────────────── */


/* Show all filter items (original CSS hid :first-child as it was a dropdown label) */

@media only screen and (min-width: 769px) {
    .filter__item {
        padding-right: 1.1875rem;
        padding-left: 0;
    }
    .filter__item:first-child {
        display: list-item;
        /* override: original hid it for the dropdown */
    }
    .filter__item:last-child {
        padding-right: 0;
    }
}


/* ── 12. Inline details (project page) ───────────────────── */

.details-info--inline .details-info__item {
    margin-right: 5rem;
    margin-left: 0;
}


/* ── 13. Utility badges (tech skills) ────────────────────── */

.tech-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3125rem 0.875rem;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-8);
    color: var(--color-paragraph);
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.4;
}


/* ── 14. Gallery grid (portfolio page) ───────────────────── */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}

.gallery-grid__item {
    display: block;
    border-radius: var(--radius-20);
    overflow: hidden;
    background: var(--color-surface-1);
    border: 1px solid var(--color-border);
    transition: transform .2s ease, box-shadow .2s ease;
    text-decoration: none;
}

.gallery-grid__item:hover {
    transform: translateY(-4px);
    box-shadow: var(--box-shadow-40);
}

.gallery-grid__image-wrap {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--color-surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-grid__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.gallery-grid__item:hover .gallery-grid__image {
    transform: scale(1.05);
}

.gallery-grid__caption {
    padding: 1rem 1.125rem;
}

.gallery-grid__title {
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
    color: var(--color-heading);
}

.gallery-grid__category {
    font-size: 0.75rem;
    color: var(--color-accent);
    opacity: 0.8;
}


/* ── 15. Alert banners (contact page) ────────────────────── */

.alert {
    border-radius: var(--radius-12);
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}


/* ── 16. Form groups ─────────────────────────────────────── */

.form-group {
    margin-bottom: 1.25rem;
}

.form-group .overhead {
    display: block;
    margin-bottom: 0.4rem;
}


/* ── 17. Sidebar social links alignment ─────────────────── */

@media only screen and (max-width: 1200px) {
    .social {
        text-align: left;
    }
}


/* ── 18. is-invalid form feedback ───────────────────────── */

.is-invalid {
    border-color: var(--color-error) !important;
}

.help-block.with-errors {
    color: var(--color-error);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: block;
}


/* ── 19. Progress bar — skill title left, percentage right ── */

.progress .progress-text {
    display: flex;
    align-items: center;
    justify-content: space-between;
}


/* ── 20. Bootstrap form-control — apply template dark styles ─ */


/* Bootstrap ships with a light-mode form-control that ignores   */


/* the template's CSS variables. These overrides fix textarea,   */


/* input, and select to match the dark design system.            */

.form-control,
.form-control:focus {
    background-color: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-14);
    box-shadow: none;
    color: var(--color-heading);
    font-family: var(--font-family);
    font-size: 0.9375rem;
    padding: 0.875rem 1.375rem 0.8125rem;
    transition: border-color .25s ease;
}

.form-control:focus {
    border-color: var(--color-accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 219, 110, 0.12);
}

.form-control::placeholder {
    color: var(--color-paragraph);
    opacity: 0.5;
}

textarea.form-control {
    border-radius: var(--radius-14);
    padding: 0.875rem 1.1875rem;
    resize: none;
    line-height: 1.6;
}


/* ── 20. Transitions on every interactive / pointer element ── */


/* Buttons — template already has .4s, polish hover lift */

.btn {
    transition: all .3s ease;
    transform: translateY(0);
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-50);
}

.btn:active:not(:disabled) {
    transform: translateY(0);
    transition-duration: .1s;
}

.btn:disabled {
    opacity: .55;
    cursor: not-allowed;
}


/* Nav links */

.nav__item a {
    transition: opacity .25s ease, color .25s ease;
}


/* Social links */

.social__link {
    transition: transform .25s ease, opacity .25s ease;
    display: inline-flex;
}

.social__link:hover {
    transform: translateY(-3px);
    opacity: 1 !important;
}


/* Sidebar toggle button */

.sidebar__btn {
    transition: background .25s ease, color .25s ease;
}


/* Tech skill badges */

.tech-badge {
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.tech-badge:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}


/* Gallery cards */

.gallery-grid__item {
    transition: transform .25s ease, box-shadow .25s ease;
}


/* Filter links */

.filter__link {
    transition: opacity .25s ease, color .25s ease;
}

.filter__item.active .filter__link {
    cursor: default;
}


/* Timeline dots — subtle pulse on hover over item */

.timeline__item {
    transition: border-color .25s ease;
}

.timeline__item:hover {
    border-color: rgba(255, 219, 110, 0.4);
}


/* Certificate / case cards */

.case-item.box.box-inner {
    transition: transform .25s ease, box-shadow .25s ease;
}

.case-item.box.box-inner:hover {
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-50);
}


/* Language / cert cards */

.box.box-inner {
    transition: box-shadow .25s ease;
}


/* Any remaining pointer elements */

[style*="cursor:pointer"],
[style*="cursor: pointer"] {
    transition: opacity .2s ease;
}


/* ── 21. Avatar image on mobile ─────────────────────────── */

@media only screen and (max-width: 580px) {
    .sidebar .avatar-box {
        margin: 0 1rem 0 0;
    }
}