body,
html {
    position: relative;
    z-index: 0;
    margin: 0;
    padding: 0;
    width: 100%;
    scroll-behavior: smooth;
    scrollbar-color: #956afa #0c0c0c;
    scrollbar-width: thin;
    scrollbar-gutter: stable;

    background-color: #0c0c0c;
}

body {
    position: relative;
    z-index: 0;
}

.background {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    --color: #171717;
    background-color: #0c0c0c;
    background-image: linear-gradient(0deg, transparent 24%, var(--color) 25%, var(--color) 26%, transparent 27%, transparent 74%, var(--color) 75%, var(--color) 76%, transparent 77%, transparent),
        linear-gradient(90deg, transparent 24%, var(--color) 25%, var(--color) 26%, transparent 27%, transparent 74%, var(--color) 75%, var(--color) 76%, transparent 77%, transparent);
    background-size: 110px 110px;

    box-shadow:
        inset 0 60px 220px #0c0c0c,
        inset 0 -60px 320px #0c0c0c,
        inset 30px 0 700px #0c0c0c,
        inset -30px 0 700px #0c0c0c;
}

.cursor-trail {
    position: fixed;
    left: 0;
    top: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;

    background: transparent;
    border-radius: 50%;
    box-shadow: 0 0 80px 30px #ffffff15;
    transition: box-shadow .2s ease, transform .2s ease;
}

.cursor-trail.active {
    box-shadow: 0 0 85px 35px #ffffff20;
    transform: translate(-50%, -50%) scale(1.01);
}

@font-face {
    font-family: 'Geometric';
    src: url('fonts/geometrix-branding.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 75px;
    z-index: 9999;

    background: transparent;
    transition: background 0.3s ease, border-bottom 0.3s ease, backdrop-filter 0.3s ease;

    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.navbar.scrolled {
    background: #0c0c0cd0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid #70707040;
}

.back-btn {
    width: 120px;
    height: 40px;
    margin-left: 70px;

    border-radius: 9999px;
    background: #fcfcfc;
    color: #0c0c0c;
    font-family: 'Godber';
    font-size: 17px;

    text-decoration: none;

    display: flex;
    justify-content: center;
    align-items: center;

    transition: box-shadow 0.4s ease, transform 0.25s ease;
}

.back-btn:hover {
    box-shadow: 0 5px 35px #fcfcfc50;
    transform: translateY(-1.5px);
}

.back-btn:active {
    box-shadow: 0 6px 50px #fcfcfc60;
    transform: scale(0.93);
}

.home-content {
    margin-top: 120px;
    margin-left: 70px;
}

.home-wrap {
    width: auto;
    height: auto;

    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.title {
    color: #fcfcfc;
    font-family: 'Geometric';
    font-weight: 200;
    font-size: 100px;

    margin: 0;
}

.title span {
    color: #956afa;
}


.paragraph {
    width: 700px;
    color: #fcfcfc90;
    font-family: 'GeneraLight';
    font-size: 30px;

    margin: 0;
    margin-top: 15px;
    margin-bottom: 30px;
}

.stats-wrap {
    margin-bottom: 30px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
}


.projects-count,
.average-rating-wrap {
    width: auto;
    height: 50px;

    padding-left: 25px;
    padding-right: 25px;

    border-radius: 35px;
    border: 0.8px solid #30303050;
    background-color: #66666610;

    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);

    color: #fcfcfcdb;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: lighter;

    display: flex;
    justify-content: center;
    align-items: center;
}

.average-rating-wrap::after {
    content: "\2605";
    margin-left: 6px;
}

.contact-me-btn {
    width: 150px;
    height: 50px;

    border-radius: 999px;
    border: 2px solid #fcfcfc;
    background-color: transparent;

    color: #fcfcfc;
    font-family: 'Godber';
    font-size: 20px;

    margin-top: 35px;

    text-decoration: none;

    display: flex;
    justify-content: center;
    align-items: center;

    transition: box-shadow 0.4s ease, transform 0.25s ease;
}

.contact-me-btn:hover {
    box-shadow: 0 5px 35px #fcfcfc50;
    transform: translateY(-1.5px);
    background: #fcfcfc;
    color: #0c0c0c;
}

.contact-me-btn:active {
    box-shadow: 0 6px 50px #fcfcfc60;
    transform: scale(0.93);
}


.home-image {
    margin-top: 150px;
    margin-right: 170px;
}

.home-image img {
    width: 360px;
    transform: rotate(10deg);
}


.works-wrap {
    margin-top: 60px;
    margin-left: 70px;
    margin-right: 70px;

    display: flex;
    flex-direction: column;
    align-items: normal;
}

.works-title {
    color: #fcfcfcc7;
    font-family: 'Genera';
    font-size: 40px;
}

.works {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.work-card {
    width: 330px;
    height: 100%;
    min-width: 320px;

    margin-bottom: 15px;

    border-radius: 25px;
    border: 1px solid #70707050;
    background: #0c0c0c50;

    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);

    display: flex;
    flex-direction: column;
    align-items: center;

    transition: all 0.4s ease;
}

.work-card:hover {
    transform: scale(0.99);
    box-shadow: 0 5px 40px #3a3a3a50;
}

.work-image-wrap {
    width: 310px;
    height: 174px;
    border-radius: 20px;
    margin-top: 8px;
    overflow: hidden;
}

.work-image-text {
    width: 310px;
    height: 174px;

    transform: translateY(-90%);
    margin: 0;
    opacity: 0;
    filter: blur(50px);
    
    color: #fcfcfc;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;

    pointer-events: none;
    text-align: center;
    transition: all 0.3s;
    
    display: flex;
    justify-content: center;
    align-items: center;
}

.work-image-text.active {
    transform: translateY(-102%);
    opacity: 1;
    filter: blur(0);
}

.work-image {
    width: 310px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    z-index: 1;

    transition: 0.3s;
}

.work-image:hover {
    transform: scale(1.1);
    filter: brightness(35%);
}

.work-title {
    width: 100%;
    margin: 0;
    margin-top: 15px;
    margin-left: 35px;

    color: #fcfcfc;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 24px;

    text-align: start;
}

.work-about {
    width: calc(100% - 60px);
    margin: 5px 30px auto 5px;

    color: #fcfcfc70;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    text-align: start;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.work-buttons {
    width: 100%;
    height: auto;

    margin-bottom: 10px;

    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.view-work-btn,
.rating-work-btn {
    width: 100%;
    height: 45px;

    cursor: pointer;

    border: none;
    border-radius: 9999px;
    background: #fcfcfc;

    color: #0c0c0c;
    font-family: 'Godber';
    font-size: 16px;

    text-decoration: none;

    display: flex;
    justify-content: center;
    align-items: center;

    transition: box-shadow 0.4s ease, transform 0.25s ease;
}

.view-work-btn:hover,
.rating-work-btn:hover {
    box-shadow: 0 5px 35px #fcfcfc50;
    transform: translateY(-1.5px);
}

.view-work-btn:active,
.rating-work-btn:active {
    box-shadow: 0 6px 50px #fcfcfc60;
    transform: scale(0.93);
}

.view-work-btn {
    margin-left: 10px;
}

.rating-work-btn {
    margin-right: 10px;
}

/* === Scroll Reveal Animations === */
.reveal {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(25px) scale(0.97);
    transition-property: opacity, filter, transform;
    transition-duration: 0.6s;
    transition-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, filter, transform;
}

.reveal.active {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
}

.reveal-navbar {
    opacity: 0;
    filter: blur(5px);
    transform: translateY(-15px);
    transition-property: opacity, filter, transform;
    transition-duration: 0.6s;
    transition-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, filter, transform;
}

.reveal-navbar.active {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* Footer Styling */
.footer {
    width: 100%;
    margin-top: 100px;
    padding: 40px 20px;
    box-sizing: border-box;
    border-top: 1px solid #70707050;
    background: #0c0c0c50;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    text-align: center;
}

.footer-title {
    color: #fcfcfc;
    font-family: 'Geometric';
    font-size: 30px;
    margin: 0;
}

.footer-title span {
    color: #956afa;
}

.footer-text {
    color: #fcfcfc70;
    font-family: 'GeneraLight', Arial, sans-serif;
    font-size: 14px;
    margin: 0;
}

.footer-socials {
    display: flex;
    gap: 20px;
}

.social-link {
    color: #fcfcfc;
    text-decoration: none;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    transition: color 0.3s ease;
}

.social-link:hover {
    color: #956afa;
}

/* --- RESPONSIVE LAYOUT (Laptop, Tablet, Mobile) --- */

/* Laptop / Smaller Desktops */
@media (max-width: 1300px) {
    .home-content {
        margin-left: 40px;
    }
    .home-image {
        margin-right: 40px;
    }
    .title {
        font-size: 80px;
    }
    .paragraph {
        width: 100%;
        max-width: 550px;
    }
    .works-wrap {
        margin-left: 40px;
        margin-right: 40px;
    }
}

/* Tablet Layout */
@media (max-width: 950px) {
    .home-wrap {
        flex-direction: column;
        justify-content: center;
    }
    .home-content {
        margin-top: 100px;
        margin-left: 20px;
        margin-right: 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .home-image {
        display: none;
    }
    .title {
        font-size: 65px;
    }
    .paragraph {
        width: 100%;
        max-width: 600px;
        font-size: 22px;
    }
    .stats-wrap {
        justify-content: center;
        flex-wrap: wrap;
    }
    .works-wrap {
        margin-left: 20px;
        margin-right: 20px;
    }
}

/* Mobile Layout */
@media (max-width: 650px) {
    .background {
        background-size: 70px 70px;
        box-shadow:
            inset 0 40px 100px #0c0c0c,
            inset 0 -40px 150px #0c0c0c,
            inset 10px 0 80px #0c0c0c,
            inset -10px 0 80px #0c0c0c;
    }
    .navbar {
        height: 60px;
    }
    .back-btn {
        margin-left: 15px;
        width: 100px;
        height: 35px;
        font-size: 14px;
    }
    .home-content {
        margin-top: 90px;
    }
    .title {
        font-size: 45px;
    }
    .paragraph {
        font-size: 16px;
    }
    .projects-count, .average-rating-wrap {
        height: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }
    .projects-count h4, .average-rating-wrap h4 {
        font-size: 13px;
        margin: 0;
    }
    .home-image {
        display: none;
    }
    
    .works-title {
        font-size: 32px;
    }
    .works {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Make cards fluid on mobile */
    .work-card {
        width: 100%;
        min-width: unset;
        max-width: 400px;
        margin: 0 auto;
    }
    .work-image-wrap {
        width: calc(100% - 20px);
        height: auto;
        aspect-ratio: 16/9;
    }
    .work-image {
        width: 100%;
        height: 100%;
    }
    .work-image-text {
        width: 100%;
        height: 100%;
    }
    
    .work-title {
        font-size: 22px;
        margin-left: 20px;
    }
    .work-about {
        width: calc(100% - 40px);
        margin-left: 20px;
        font-size: 13.5px;
    }
    .work-buttons {
        padding: 0 10px;
        box-sizing: border-box;
    }
    .view-work-btn, .rating-work-btn {
        height: 42px;
        font-size: 14px;
        margin-left: 5px;
        margin-right: 5px;
    }
    .contact-me-btn {
        width: 140px;
        height: 40px;
        font-size: 16px;
        margin-top: 5px;
    }
    .toast-notification {
        width: 90%;
        max-width: 250px;
        padding: 10px 15px;
        bottom: 20px;
        justify-content: center;
    }
    .toast-content {
        justify-content: center;
    }
}

/* === Modal & Toast System === */
.rating-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(12, 12, 12, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.rating-modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.rating-modal {
    background: #0c0c0ce6;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid #70707040;
    border-radius: 45px;
    width: 90%;
    max-width: 440px;
    padding: 40px;
    position: relative;
    transform: translateY(30px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 40px 100px rgba(0,0,0,0.9);
}

.rating-modal-overlay.active .rating-modal {
    transform: translateY(0) scale(1);
}

.close-modal-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    background: transparent;
    border: none;
    color: #fcfcfc70;
    font-size: 32px;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.2s ease;
}

.close-modal-btn:hover {
    color: #fcfcfc;
    transform: scale(1.1);
}

.modal-title {
    color: #fcfcfcc7;
    font-family: 'Genera', sans-serif;
    font-size: 38px;
    margin: 0 0 10px 0;
    text-align: center;
}

.modal-desc {
    color: #fcfcfc90;
    font-family: 'GeneraLight', Arial, sans-serif;
    font-size: 16px;
    margin: 0 0 25px 0;
    text-align: center;
}

.stars-container {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.star {
    font-style: normal;
    font-size: 45px;
    color: #333;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.1s ease;
}

.star:hover, .star.hovered {
    color: #bfa1ff;
    transform: scale(1.05);
}

.star.selected {
    color: #956afa;
}

.star:active {
    transform: scale(0.95);
}

.comment-box {
    width: 100%;
    height: 120px;
    background: #ffffff08;
    border: 1px solid #70707050;
    border-radius: 20px;
    padding: 20px;
    color: #fcfcfc;
    font-family: 'GeneraLight', Arial, sans-serif;
    font-size: 15px;
    resize: none;
    margin-bottom: 30px;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.comment-box:focus {
    outline: none;
    border-color: #956afa;
    background: #ffffff10;
    box-shadow: 0 0 20px rgba(149, 106, 250, 0.15);
}

.submit-rating-btn {
    width: 100%;
    height: 50px;
    border-radius: 9999px;
    border: none;
    background: #fcfcfc;
    color: #0c0c0c;
    font-family: 'Godber', sans-serif;
    font-size: 18px;
    cursor: pointer;
    transition: box-shadow 0.4s ease, transform 0.25s ease;
}

.submit-rating-btn:hover {
    box-shadow: 0 5px 25px #fcfcfc40;
    transform: translateY(-2px);
}

.submit-rating-btn:active {
    box-shadow: 0 5px 20px #fcfcfc50;
    transform: translateY(0) scale(0.95);
}

.toast-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(120px);
    background: #181818;
    border: 1px solid #70707050;
    border-radius: 999px;
    padding: 12px 25px;
    display: flex;
    align-items: center;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.5s ease;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.toast-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

.toast-icon {
    width: 25px;
    height: 25px;
    background: #956afa;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fcfcfc;
    font-weight: bold;
    font-size: 14px;
}

.toast-text {
    color: #fcfcfc;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
}