@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600&display=swap');

@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.projects-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 40px 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.tp-home-blog-wrap {
    position: relative;
    z-index: 1;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    animation: fadeInSlideUp 0.8s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
    background-color: #1a1a1a;
}

.tp-home-blog-wrap:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: rgba(110, 231, 103, 0.4);
}

.tp-home-bg-position {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    opacity: 0.05;
    filter: blur(10px);
    transition: opacity 0.4s ease;
}

.tp-home-blog-wrap:hover .tp-home-bg-position {
    opacity: 0.1;
}

.tp-home-blog-flex-wrap {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    position: relative;
    z-index: 3;
}

.tp-home-blog-thumb {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeInSlideUp 0.8s 0.2s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
    opacity: 0;
}

.tp-home-blog-thumb img {
    width: 160px;
    height: 160px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tech-icons-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.tp-home-software-item {
    opacity: 0;
    animation: fadeInSlideUp 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.tp-home-software-item:nth-child(1) { animation-delay: 0.5s; }
.tp-home-software-item:nth-child(2) { animation-delay: 0.6s; }
.tp-home-software-item:nth-child(3) { animation-delay: 0.7s; }
.tp-home-software-item:nth-child(4) { animation-delay: 0.8s; }
.tp-home-software-item:nth-child(5) { animation-delay: 0.9s; }
.tp-home-software-item:nth-child(6) { animation-delay: 1.0s; }
.tp-home-software-item:nth-child(7) { animation-delay: 1.1s; }
.tp-home-software-item:nth-child(8) { animation-delay: 1.2s; }

.tp-home-software-item a {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 42px;
    height: 42px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: #d2d2d2;
    font-size: 24px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.tp-home-software-item a::after {
    content: attr(title);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1a1a1a;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Roboto Mono', monospace;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.tp-home-software-item a:hover::after {
    opacity: 1;
    visibility: visible;
}

.tp-home-software-item a:hover {
    background-color: rgba(110, 231, 103, 0.15);
    color: white;
    transform: translateY(-3px);
}

.tp-home-blog-text-wrap {
    color: #d2d2d2;
    animation: fadeInSlideUp 0.8s 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
    opacity: 0;
}

.tp-home-title {
    font-size: 24px;
    font-weight: 600;
    color: white;
    margin: 0 0 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tp-home-title a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tp-home-title .project-title-link {
    font-family: 'Roboto Mono', monospace;
}

.project-title-icon {
    font-size: 22px;
}

.tp-home-title:hover .project-title-link,
.tp-home-title:hover .project-title-icon {
    color: #6de767;
}

.tp-home-title:hover .project-title-icon {
    transform: translateX(3px) translateY(-3px);
}

.project-description {
    font-size: 17.5px;
    line-height: 1.7;
    color: rgba(210, 210, 210, 0.85);
}

.project-description p {
    margin-bottom: 15px;
}

.tp-solid-btn {
    background-color: transparent;
    border: 1px solid rgba(110, 231, 103, 0.7);
    color: #6de767;
    padding: 12px 24px;
    border-radius: 8px;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    opacity: 0;
    animation: fadeInSlideUp 0.8s 1.3s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.tp-solid-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(110, 231, 103, 0.15), transparent);
    transition: left 0.5s ease;
    z-index: -1;
}

.tp-solid-btn:hover {
    color: white;
    border-color: #6de767;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(110, 231, 103, 0.2);
}

.tp-solid-btn:hover::before {
    left: 100%;
}

.tp-solid-btn i {
    margin-right: 8px;
    font-size: 14px;
    transition: transform 0.4s ease;
}

.tp-solid-btn:hover i {
    transform: rotate(-45deg);
}

.desktop-only {
    display: inline-flex;
}
.mobile-only {
    display: none;
}



/* Navigation layout */
#top-bar nav #mainmenu {
    height: 28px;
    display: inline-flex; /* use flex for better centering */
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px; /* space between tabs */
}

#top-bar nav #mainmenu li a {
    display: inline-block;
    font-size: 15px;
    padding: 8px 18px;
    color: #fff;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Navigation centering and scroll-hide behaviour */
#top-bar {
    transition: transform 0.3s ease;
}
#top-bar.nav-up {
    transform: translateY(-100%);
}
#top-bar nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    width: 100%;
    text-align: center;
}

/* Nav link larger font & social icon tweaks */
#top-bar nav #mainmenu li a {
    font-size: 14px;
}
.social-icons-fixed .sc-inner i {
    font-size: 20px;
    transition: transform 0.2s ease, color 0.2s ease;
}
.social-icons-fixed .sc-inner i:hover {
    color: #2196f3; /* blue */
    transform: scale(1.2);
}

/* Download button fix */
#top-bar #mp-col {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
}
#top-bar #mp-col .btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid #ffffff;
    border-radius: 4px;
    white-space: nowrap;
    background: rgba(0, 0, 0, 0);
    color: #ffffff;
    text-transform: uppercase;
    font-weight: 600;
}
#top-bar #mp-col .btn-download:hover {
    background: rgba(255, 255, 255, 0.911);
    color: #000 !important; /* force text black */
}
#top-bar #mp-col .btn-download:hover *,
#top-bar #mp-col .btn-download:hover i {
    color: #000 !important; /* force icon black */
}

.mobile-only { display:none !important; }
/* Active tab highlight */
#top-bar nav #mainmenu li a {
    position: relative;
    /* keep for pseudo underline positioning */
}
#top-bar nav #mainmenu li a.active {
    color: #ffffff;
}
#top-bar nav #mainmenu li a.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0; /* snug under text */
    height: 3px; /* slightly thinner underline */
    background: rgba(255,255,255,0.9);
    border-radius: 2px;
}

/* Achievements Grid Layout */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.achievements-grid .tp-home-blog-flex-wrap {
    flex-direction: column;
    align-items: stretch;
    height: 100%;
}

/* Add horizontal space between date and org */
.achievements-grid .tp-home-blog-meta-wrap {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* Make text container a flex column to position button at the bottom */
.achievements-grid .tp-home-blog-text-wrap {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cv-btn-style {
    text-decoration: none; /* remove default underline */
    font-weight: 500;
    font-size: 16px;
    display: inline-block;
    color: var(--tp-common-white);
    backdrop-filter: blur(40px);
    background-image: linear-gradient(to right, #ffffff1c, #00000061, #ffffff1c);
    background-size: 200% auto;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 26px;
    padding: 8px 20px;
    width: 100%;
    justify-content: center;
    margin-top: auto; /* Push to bottom */
    transition: none; /* Remove hover animation */
}

.cv-btn-style:hover {
    text-decoration: none; /* keep underline off on hover */
    background-position: right center;
}

.achievements-grid .tp-home-blog-meta i {
    font-size: 20px; /* Makes icons slightly larger */
}

@media (max-width: 768px) {
    /* hide social icons and standalone CV button */
    .social-icons-fixed { display:none !important; }
    #menu-btn {
        z-index: 2001; /* keep button above menu links to absorb clicks */
        display:block !important;
    }
    #mp-col { display:none !important; }

    /* stack nav menu vertically */
    /* Ensure header can grow on mobile and menu items are not clipped */
    #top-bar {
        height: auto; /* let the bar expand based on its children */
    }

    #top-bar nav {
        position: static !important;
        left: auto !important;
        transform: none !important;
        width: 100%;
        margin-top: 0; /* remove extra offset that was pushing menu down */
        text-align: center;
    }

    /* Allow the menu list itself to grow and wrap */
    #top-bar nav #mainmenu {
        height: auto;
    }
    /* remove active highlight on mobile */
    #top-bar nav #mainmenu li a.active {
        background-image: none !important;
    }
    #top-bar nav #mainmenu {
        flex-direction: column;
        gap: 20px;
        align-items: center;
        padding-top: 40px;
    }
    #top-bar.opened nav #mainmenu {
        display: flex;
    }
    #top-bar nav #mainmenu li {
        display: block;
    }
    #top-bar nav #mainmenu li a {
        display: block;
        padding: 10px 0;
    }

    /* Style CV link inside mobile menu */
    #top-bar nav #mainmenu li.mobile-only a {
        display: block;
        color: #ffffff;
        padding: 10px 0;
        text-transform: uppercase;
        font-weight: 600;
        letter-spacing: 1px;
        margin-top: 0;
    }

    .tp-home-blog-flex-wrap {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .tp-home-blog-thumb {
        width: 100%;
    }

    .tp-home-blog-thumb img {
        width: 120px; 
        height: 120px; 
    }

    .tp-home-blog-text-wrap {
        width: 100%;
    }

    .tp-home-title { 
        justify-content: center;
    }

    .project-title-icon {
        display: none;
    }

    .desktop-only {
        display: none;
    }

    .mobile-only {
        display: inline-flex !important;
        justify-content: center;
        width: 100%;
        margin-top: 30px;
        box-sizing: border-box;
    }

    .achievements-grid {
        grid-template-columns: 1fr;
    }
}

.typed,
.h1_big,
.h1_big .typed {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}