html {
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Titillium Web', sans-serif;
}

body {
    background: radial-gradient(circle at 50% 30%, #183354 0%, #09121f 60%, #02050a 100%);
    color: #d0e3f7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5% 15px 15px 15px;

    @media(width < 1024px) {
        padding-top: 15px;
    }
}

.portfolio-app {
    width: 100%;
    max-width: 920px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.portfolio-app__header {
    text-align: left;
    padding-left: 5px;
}

.portfolio-app__title {
    font-size: 32px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 3px;
    text-shadow: 0 0 15px rgba(0, 191, 255, 0.7), 0 0 30px rgba(0, 191, 255, 0.3);
    text-transform: uppercase;

    @media (width < 640px) {
        font-size: 24px;
    }
}

.portfolio-app__subtitle {
    font-size: 15px;
    font-weight: 400;
    color: #6db1f0;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-top: 2px;

    @media (width < 640px) {
        font-size: 12px;
    }
}

.portfolio-card {
    background: rgba(8, 14, 24, 0.92);
    border: 1px solid #1a3250;
    border-top-color: #2b4b75;
    border-radius: 10px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(0, 140, 255, 0.2);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.portfolio-nav {
    background: linear-gradient(0deg, #18273d 0%, #0c1524 100%);
    border-bottom: 1px solid #08101B;
    display: flex;
    padding: 0 30px;
    gap: 30px;

    @media (width < 640px) {
        padding: 0 20px;
        gap: 18px;
    }
}

.portfolio-nav__button {
    background: transparent;
    border: none;
    color: #83a2c9;
    font-size: 13px;
    font-weight: 600;
    padding: 16px 0;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.portfolio-nav__button:hover {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(0, 191, 255, 0.8);
}

.portfolio-nav__button--active {
    color: #ffffff;
}

.portfolio-nav__button--active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #00BFFF;
    box-shadow: 0 0px 10px #00bfff, 0 0 20px #00bfff;
    z-index: 2;
}

.portfolio-content {
    border-top: 1px solid #1A3250;
    padding: 30px;
    transition: height 0.3s ease;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-content {
        padding: 20px;
    }
}

.portfolio-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.portfolio-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #1c3556;
    padding-bottom: 6px;
    position: relative;
}

.portfolio-panel__header::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    width: 18px;
    height: 3px;
    background: #00bfff;
    box-shadow: 0 0 8px #00bfff;
}

.portfolio-panel__title {

    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.portfolio-box {
    position: relative;
    border: 1px solid #1f3759;
    background: rgba(12, 21, 35, 0.8);
    padding: 16px;
}

.portfolio-box::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    width: 8px;
    height: 8px;
    border-top: 2px solid #00bfff;
    border-left: 2px solid #00bfff;
}

.portfolio-box::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    border-bottom: 2px solid #00bfff;
    border-right: 2px solid #00bfff;
}

.portfolio-profile {
    display: flex;
    gap: 16px;
}

.portfolio-profile__img-wrapper {
    position: relative;
    width: 90px;
    height: 90px;
    flex-shrink: 0;
    cursor: pointer;
    border: 1px solid #00bfff;
    box-shadow: 0 0 10px rgba(0, 191, 255, 0.3);
    overflow: hidden;
}

.portfolio-profile__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.portfolio-profile__img-wrapper:hover .portfolio-profile__img {
    transform: scale(1.08);
}

.portfolio-profile__content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.portfolio-profile__text {
    font-size: 14px;
    line-height: 1.5;
    color: #a7c5e8;
    font-weight: 400;
}

.portfolio-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.portfolio-socials__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 32px;
    padding: 0 8px;
    background: #111d2e;
    border: 1px solid #233e63;
    border-radius: 3px;
    color: #ffffff;
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    transition: all 0.25s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.portfolio-socials__item:hover {
    border-color: #00bfff;
    box-shadow: 0 0 12px rgba(0, 191, 255, 0.6);
    transform: translateY(-2px);
}

.portfolio-socials__item--fb {
    background: #1877f2;
    border-color: #3b88f5;
}

.portfolio-socials__item--be {
    background: #0057ff;
    border-color: #3378ff;
}

.portfolio-socials__item--dg {
    background: #1b5999;
    border-color: #2b70b8;
}

.portfolio-socials__item--su {
    background: #eb4823;
    border-color: #f06a4d;
}

.portfolio-socials__item--tb {
    background: #36465d;
    border-color: #4f627e;
}

.portfolio-socials__item--tw {
    background: #1da1f2;
    border-color: #4ab3f4;
}

.portfolio-socials__item--yt {
    background: #ff0000;
    border-color: #ff3333;
}

.portfolio-socials__item--gh {
    background: #24292e;
    border-color: #404448;
}

.portfolio-socials__item--li {
    background: #0A66C2;
    border-color: #126fcc;
}

.portfolio-socials__item--so {
    background: #D37B2E;
    border-color: #e48837;
}

.portfolio-recent {
    background: rgba(12, 21, 35, 0.8);
    border: 1px solid #1d3658;
    height: 140px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.portfolio-recent:hover {
    border-color: #00bfff;
    box-shadow: 0 0 15px rgba(0, 191, 255, 0.4);

    .portfolio-recent__overlay {
        border-color: #00bfff;
    }
}

.portfolio-recent__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    opacity: 0.75;
    transition: all 0.3s ease;
}

.portfolio-recent:hover .portfolio-recent__img {
    opacity: 1;
    transform: scale(1.03);
}

.portfolio-recent__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(6, 11, 18, 0.88);
    padding: 8px 12px;
    font-size: 12px;
    color: #ffffff;
    border-top: 1px solid #1d3658;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: border-color 0.3s ease;
}

.portfolio-recent__icon {
    color: #00bfff;
    font-size: 14px;
}

.portfolio-carousel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.portfolio-list {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
    width: 100%;
}

.portfolio-list::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

.portfolio-page {
    flex: 0 0 100%;
    min-width: 100%;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 2px 2px;
}

.portfolio-carousel__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 6px;
}

.portfolio-carousel__pagination {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(8, 17, 28, 0.85);
    border: 1px solid #1D3759;
    border-radius: 20px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.6), 0 0 15px rgba(0, 191, 255, 0.08);
}

.portfolio-carousel__dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.portfolio-carousel__arrow {
    background: transparent;
    border: none;
    color: #6a95c9;
    line-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
    padding: 8px 8px 14px 8px;
    font-size: 24px;
}

.portfolio-carousel__arrow--prev {
    border-right: 1px solid #1D3759;
}

.portfolio-carousel__arrow--next {
    border-left: 1px solid #1D3759;
}

.portfolio-carousel__arrow:hover:not(:disabled) {
    color: #00bfff;
    text-shadow: 0 0 8px #00bfff;
}

.portfolio-carousel__arrow:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    color: #3b506d;
    transform: none;
    text-shadow: none;
}

.portfolio-carousel__dot {
    width: 8px;
    height: 8px;
    background: #0f1c2e;
    border: 1px solid #23436b;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.25s ease;
    padding: 0;
}

.portfolio-carousel__dot:hover {
    border-color: #00bfff;
    box-shadow: 0 0 4px rgba(0, 191, 255, 0.5);
}

.portfolio-carousel__dot--active {
    background: #006181;
    border-color: #00bfff;
    box-shadow: 0 0 4px #00bfff;
}

portfolio-item {
    display: block;
    width: 100%;
}

.portfolio-item {
    display: flex;
    gap: 20px;
    width: 100%;
    transition: border-color 0.3s ease;
}

.portfolio-item:hover {
    border-color: #00bfff;
}

@media (max-width: 640px) {
    .portfolio-item {
        flex-direction: column;
    }
}

.portfolio-item__preview {
    width: 220px;
    height: 140px;
    flex-shrink: 0;
    position: relative;
    border: 1px solid #00bfff;
    overflow: hidden;
    cursor: pointer;
    border-radius: 2px;
}

@media (max-width: 640px) {
    .portfolio-item__preview {
        width: 100%;
        height: 180px;
    }
}

.portfolio-item__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.portfolio-item__preview:hover .portfolio-item__img {
    transform: scale(1.06);
}

.portfolio-item__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 191, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item__preview:hover .portfolio-item__overlay {
    opacity: 1;
}

.portfolio-item__zoom-badge {
    background: #09121f;
    color: #00bfff;
    border: 1px solid #00bfff;
    padding: 4px 10px;

    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 2px;
}

.portfolio-item__info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.portfolio-item__title {

    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.portfolio-item__desc {
    font-size: 14px;
    color: #a4c2e5;
    line-height: 1.55;
    margin-bottom: 12px;
    font-weight: 400;
}

.portfolio-item__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.portfolio-tag {
    background: #0f1c2e;
    border: 1px solid #23436b;
    color: #00bfff;
    font-size: 12px;
    font-weight: 400;
    padding: 6px 12px;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.portfolio-tag.small {
    font-size: 10px;
    padding: 3px 6px;
}

.portfolio-btn {
    display: inline-block;
    margin-top: 10px;
    background: #111f33;
    border: 1px solid #00bfff;
    color: #ffffff;

    font-size: 11px;
    font-weight: 700;
    padding: 6px 14px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    align-self: flex-start;
    cursor: pointer;
    transition: all 0.25s ease;
}

.portfolio-btn:hover {
    background: #00bfff;
    color: #000000;
    box-shadow: 0 0 10px rgba(0, 191, 255, 0.8);
}

.portfolio-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.portfolio-form__group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.portfolio-form__group.horizontal {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;

    @media (width < 1024px) {
        align-items: unset;
        flex-direction: column;
        justify-content: unset;
    }
}

.portfolio-form__label {
    font-size: 11px;
    font-weight: 700;
    color: #00bfff;
    letter-spacing: 1px;
}

.portfolio-form__input,
.portfolio-form__textarea {
    background: #08111c;
    border: 1px solid #1d3759;
    color: #ffffff;
    padding: 12px;

    font-size: 15px;
    border-radius: 3px;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.portfolio-form__input:focus,
.portfolio-form__textarea:focus {
    border-color: #00bfff;
    box-shadow: 0 0 10px rgba(0, 191, 255, 0.4);
}

.portfolio-form__textarea {
    resize: vertical;
    min-height: 120px;
}

.portfolio-form__submit {
    align-self: flex-start;
    background: linear-gradient(180deg, #18273d 0%, #0c1524 100%);
    border: 1px solid #1D3759;
    border-top-color: #2b4b75;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 12px 28px;
    cursor: pointer;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-radius: 3px;
    transition: all 0.3s ease;

    @media (width < 640px) {
        width: 100%;
    }
}

.portfolio-form__submit:hover {
    border-color: #2b4b75;
    box-shadow: 0 0 20px rgba(3, 54, 102, 0.6);
}

#portfolio-form-success {
    display: none;
    color: #2bdb98;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.portfolio-form__loader {
    position: absolute;
    inset: 0;
    background: rgba(8, 14, 24, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.portfolio-form__loader.active {
    opacity: 1;
    pointer-events: all;
}

.portfolio-form__spinner {
    width: 42px;
    height: 42px;
    border: 3px solid rgba(0, 191, 255, 0.2);
    border-top-color: #00bfff;
    border-radius: 50%;
    animation: portfolio-spin 0.8s linear infinite;
    box-shadow: 0 0 15px rgba(0, 191, 255, 0.4);
}

@keyframes portfolio-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.image-dialog__native {
    margin: auto;
    padding: 0;
    border: 1px solid #00bfff;
    background: #09121f;
    color: #ffffff;
    max-width: 85vw;
    max-height: 90vh;
    box-shadow: 0 0 40px rgba(0, 191, 255, 0.5), 0 25px 70px rgba(0, 0, 0, 0.95);
    outline: none;
}

.image-dialog__native::backdrop {
    background: rgba(3, 8, 16, 0.88);
    backdrop-filter: blur(6px);
}

.image-dialog__container {
    position: relative;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    overflow: hidden;
}

.image-dialog__close {
    outline: 0;
    position: absolute;
    top: 0;
    right: 0;
    border: 0;
    background: #00bfff;
    color: #111e30;
    font-size: 11px;
    font-weight: 400;
    cursor: pointer;
    display: block;
    padding: 3px 5px;
    width: auto;
    line-height: 1;
    transition: all 0.2s ease;
}

.image-dialog__close:hover {
    background: #00bfff;
    color: #000000;
    box-shadow: 0 0 10px #00bfff;
}

.image-dialog__media-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 95vw;
    max-height: 80vh;
    overflow: hidden;
}

.image-dialog__fullsize-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(12, 21, 35, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(0, 191, 255, 0.7);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 10px 18px;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 12px rgba(0, 191, 255, 0.3);
    opacity: 0.85;
    transition: all 0.25s ease;
    z-index: 5;
}

.image-dialog__fullsize-btn:hover {
    opacity: 1;
    background: rgba(0, 191, 255, 0.85);
    color: #08111c;
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.8);
}

.image-dialog__img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border: 1px solid #1e385c;
    border-radius: 4px;
    display: block;
}

/* Full resolution mode with scrollbars */
.image-dialog__container--full .image-dialog__media-wrapper {
    overflow: auto;
    max-width: 85vw;
    max-height: 75vh;
    display: block;
    border: 1px solid #1e385c;
}

.image-dialog__container--full .image-dialog__img {
    max-width: none;
    max-height: none;
    border: none;
}

.image-dialog__container--full .image-dialog__fullsize-btn {
    position: fixed;
    top: auto;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.image-dialog__caption {
    max-width: 800px;
    font-size: 15px;
    color: #b8d5f8;
    line-height: 1.4;
}