/* ==========================================================================
   1. GOOGLE FONTS & GLOBAL RESET
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    background: #081b29;
    color: #ededed;
    overflow-x: hidden;
}

/* ==========================================================================
   2. HEADER & ANIMATED AMBIENT TWO-LINE NAVBAR
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px 10%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: linear-gradient(135deg, rgba(8, 27, 41, 0.94), rgba(20, 45, 70, 0.88), rgba(40, 20, 60, 0.88), rgba(8, 27, 41, 0.94));
    background-size: 300% 300%;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 238, 255, 0.25);
    box-shadow: 0 4px 30px rgba(0, 238, 255, 0.15);
    animation: headerGlow 8s ease infinite alternate;
}

@keyframes headerGlow {
    0% {
        background-position: 0% 50%;
        box-shadow: 0 4px 25px rgba(0, 238, 255, 0.12);
        border-bottom-color: rgba(0, 238, 255, 0.2);
    }
    50% {
        background-position: 100% 50%;
        box-shadow: 0 4px 35px rgba(176, 38, 255, 0.18);
        border-bottom-color: rgba(176, 38, 255, 0.25);
    }
    100% {
        background-position: 0% 50%;
        box-shadow: 0 4px 25px rgba(0, 238, 255, 0.12);
        border-bottom-color: rgba(0, 238, 255, 0.2);
    }
}

.logo {
    font-size: 26px;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.5px;
    opacity: 0;
    animation: slideRight 1s ease forwards;
}

.navbar {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.nav-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-row a {
    display: inline-block;
    font-size: 14.5px;
    color: #ededed;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    opacity: 0;
    animation: slideTop 0.5s ease forwards;
    animation-delay: calc(0.1s * var(--i));
    position: relative;
    padding: 2px 0;
}

.nav-row a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #0ef;
    border-radius: 2px;
    box-shadow: 0 0 8px #0ef;
    transition: width 0.3s ease;
}

.nav-row a:hover,
.nav-row a.active {
    color: #0ef;
    text-shadow: 0 0 10px rgba(0, 238, 255, 0.6);
}

.nav-row a:hover::after,
.nav-row a.active::after {
    width: 100%;
}

/* ==========================================================================
   3. HERO / HOME SECTION
   ========================================================================== */
.home {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 120px 10% 40px;
}

.home-content {
    max-width: 600px;
}

.home-content h3 {
    font-size: 32px;
    font-weight: 700;
    opacity: 0;
    animation: slideBottom 1s ease forwards;
    animation-delay: .7s;
}

.home-content h3:nth-of-type(2) {
    margin-bottom: 20px;
    animation: slideTop 1s ease forwards;
    animation-delay: .7s;
}

.home-content h3 span {
    color: #0ef;
}

.home-content h1 {
    font-size: 56px;
    font-weight: 700;
    margin: -3px 0;
    opacity: 0;
    animation: slideRight 1s ease forwards;
    animation-delay: 1s;
}

.home-content p {
    font-size: 16px;
    line-height: 1.6;
    opacity: 0;
    text-align: justify;
    animation: slideLeft 1s ease forwards;
    animation-delay: 1.2s;
}

.home-sci {
    margin: 25px 0;
}

.home-sci a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 42px;
    height: 42px;
    background: transparent;
    border: 2px solid #0ef;
    border-radius: 50%;
    font-size: 20px;
    color: #0ef;
    text-decoration: none;
    margin-right: 12px;
    transition: .4s ease;
    opacity: 0;
    animation: slideLeft 1s ease forwards;
    animation-delay: calc(.12s * var(--i));
}

.home-sci a:hover {
    background: #0ef;
    color: #081b29;
    box-shadow: 0 0 20px #0ef;
}

.btn-box {
    display: inline-block;
    padding: 12px 28px;
    background: #0ef;
    border-radius: 40px;
    font-size: 16px;
    color: #081b29;
    letter-spacing: 1px;
    text-decoration: none;
    font-weight: 600;
    opacity: 0;
    animation: slideTop 1s ease forwards;
    animation-delay: 1.8s;
    box-shadow: 0 0 5px #0ef, 0 0 20px #0ef;
    transition: .4s ease;
}

.btn-box:hover {
    box-shadow: 0 0 5px cyan, 0 0 25px cyan, 0 0 50px cyan;
}

.home-img {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    animation: zoomIn 1.2s ease forwards;
    animation-delay: 1.2s;
}

.img-box {
    position: relative;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #0ef, #b026ff, #0ef);
    box-shadow: 0 0 40px rgba(0, 238, 255, 0.45), 0 0 80px rgba(176, 38, 255, 0.35);
    padding: 8px;
}

.img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 6px solid #081b29;
}

/* ==========================================================================
   4. COMMON SECTION LAYOUTS & HEADERS
   ========================================================================== */
.section-container {
    width: 100%;
    display: block;
    clear: both;
    padding: 30px 10% 50px;
    min-height: 100vh;
}

.section-title {
    font-size: 38px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    color: #fff;
}

.section-title span {
    color: #0ef;
    text-shadow: 0 0 10px rgba(0, 238, 255, 0.4);
}

/* ==========================================================================
   5. UNIFIED GRIDS & CARD ARCHITECTURE
   ========================================================================== */
.project-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    color: #ededed;
    border: 1.5px solid #0ef;
    padding: 8px 22px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s ease;
}

.filter-btn.active,
.filter-btn:hover {
    background: #0ef;
    color: #081b29;
    box-shadow: 0 0 15px #0ef;
}

/* Grids */
.publication-container,
.project-grid,
.credential-grid,
.skills-grid,
.review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 30px;
}

/* Experience Grid */
.experience-timeline {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 30px;
    row-gap: 35px;
    align-items: stretch;
}

/* Base Card Container */
.card {
    background: rgba(8, 27, 41, 0.7);
    border: 1.5px solid rgba(0, 238, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    border-color: #0ef;
    box-shadow: 0 0 25px rgba(0, 238, 255, 0.25);
}

/* ==========================================================================
   PROJECT CARD: SKELETON LOADER + DYNAMIC EXPANSION + JUSTIFIED TITLE
   ========================================================================== */
.project-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Image Wrapper with Animated Skeleton Spinner */
.project-card .img-wrapper {
    position: relative;
    width: 100%;
    height: 310px;
    background: #041018;
    overflow: hidden;
    flex-shrink: 0;
    border-bottom: 1.5px solid rgba(0, 238, 255, 0.2);
}

.project-card .img-wrapper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 38px;
    height: 38px;
    margin-top: -19px;
    margin-left: -19px;
    border: 3px solid rgba(0, 238, 255, 0.15);
    border-top: 3px solid #0ef;
    border-radius: 50%;
    animation: spinLoader 0.8s linear infinite;
    z-index: 1;
}

@keyframes spinLoader {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Image Transitions in from Spinner */
.project-card .card-img {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    background: #041018;
    padding: 6px;
    border-bottom: none;
    opacity: 0;
    transition: opacity 0.35s ease-in-out;
}

.project-card .card-img.loaded {
    opacity: 1;
}

/* Dynamic text area */
.project-card .card-info {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    height: auto;
}

.project-card h3 {
    font-size: 14.5px;
    line-height: 1.4;
    margin-bottom: 14px;
    font-weight: 600;
    color: #fff;
    /* text-align: justify; */
    text-justify: inter-word;
    hyphens: auto;
    height: auto;
    min-height: unset;
}

.project-card .project-links {
    margin-top: auto;
    display: flex;
    gap: 8px;
    width: 100%;
}

.project-card .project-links .btn-sm {
    flex: 1;
    padding: 7px 10px;
    font-size: 12.5px;
    justify-content: center;
    text-align: center;
}

/* Credential & Standard Card Images */
.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: top;
    border-bottom: 1px solid rgba(0, 238, 255, 0.2);
}

.card-info {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-info .preview-cert-btn,
.card-info .project-links {
    margin-top: auto;
    width: 100%;
}

.card-info .preview-cert-btn {
    justify-content: center;
}

.card-info h3 {
    font-size: 19px;
    color: #fff;
    margin-bottom: 8px;
}

.card-info h4 {
    font-size: 15px;
    color: #0ef;
    margin-bottom: 12px;
    font-weight: 500;
}

.card-info p {
    font-size: 14.5px;
    color: #b0c4de;
    line-height: 1.65;
    text-align: justify;
    margin-bottom: 15px;
}

.badge,
.project-tag {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(0, 238, 255, 0.15);
    color: #0ef;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    margin-bottom: 10px;
    align-self: flex-start;
}

.btn-sm {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: #0ef;
    color: #081b29;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-sm.outline {
    background: transparent;
    color: #0ef;
    border: 1px solid #0ef;
}

.btn-sm.outline:hover {
    background: #0ef;
    color: #081b29;
}

/* ==========================================================================
   6. REVIEWS / TESTIMONIALS STYLES
   ========================================================================== */
.review-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 22px 0;
}

.review-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, #0ef, #b026ff);
    box-shadow: 0 0 12px rgba(0, 238, 255, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.review-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #081b29;
}

.avatar-initials {
    background: linear-gradient(135deg, #0ef, #b026ff);
    color: #081b29;
    font-weight: 700;
    font-size: 20px;
}

.avatar-initials span {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #081b29;
    color: #0ef;
    display: flex;
    align-items: center;
    justify-content: center;
}

.review-user-info h3 {
    font-size: 17px;
    color: #fff;
    margin-bottom: 2px;
}

.review-user-info p {
    font-size: 13px;
    color: #b0c4de;
    margin-bottom: 4px;
}

.stars {
    color: #ffc107;
    font-size: 15px;
    display: flex;
    gap: 2px;
}

.review-text {
    font-style: italic;
    font-size: 14px;
    color: #d1e4f0;
    line-height: 1.6;
}

/* ==========================================================================
   7. CV & CERTIFICATE MODAL PREVIEWS
   ========================================================================== */
.cv-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 27, 41, 0.88);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.cv-modal-overlay.active {
    display: flex;
}

.cv-modal-box {
    background: #081b29;
    border: 2px solid #0ef;
    box-shadow: 0 0 30px rgba(0, 238, 255, 0.35);
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    border-bottom: 1px solid rgba(0, 238, 255, 0.2);
}

.modal-header h3 {
    font-size: 20px;
    color: #0ef;
}

.close-btn {
    color: #ededed;
    font-size: 30px;
    cursor: pointer;
    line-height: 1;
    transition: 0.3s;
}

.close-btn:hover {
    color: #0ef;
}

.modal-body {
    flex: 1;
    padding: 10px;
    background: #041018;
}

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

.modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 15px 25px;
    border-top: 1px solid rgba(0, 238, 255, 0.2);
}

.modal-footer .download-btn {
    opacity: 1;
    animation: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cert-modal-box {
    width: 90vw !important;
    max-width: 1100px !important;
    height: auto !important;
    max-height: 90vh !important;
    background: #081b29;
}

.cert-modal-body {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 60px;
    background: #041018;
    overflow: hidden;
}

.cert-modal-body img {
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
}

.cert-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(8, 27, 41, 0.85);
    border: 1.5px solid #0ef;
    color: #0ef;
    font-size: 28px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: none;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    transition: 0.3s ease;
}

#certPrevBtn {
    left: 12px;
}

#certNextBtn {
    right: 12px;
}

.cert-nav-btn:hover {
    background: #0ef;
    color: #081b29;
    box-shadow: 0 0 15px #0ef;
}

#certCounter {
    color: #0ef;
    font-size: 14px;
    font-weight: 600;
}

/* ==========================================================================
   8. KEYFRAME ANIMATIONS
   ========================================================================== */
@keyframes slideRight {
    0% { transform: translateX(-100px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes slideLeft {
    0% { transform: translateX(100px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes slideTop {
    0% { transform: translateY(100px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes slideBottom {
    0% { transform: translateY(-100px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes zoomIn {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   9. ABOUT & DETAILS
   ========================================================================== */
.about-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.about-block h4 {
    font-size: 18px;
    color: #0ef;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.about-block p {
    font-size: 15px;
    line-height: 1.7;
    color: #d1e4f0;
    text-align: justify;
    margin-bottom: 0;
}

.about-block strong {
    color: #0ef;
}

/* ==========================================================================
   10. CONTACT SECTION & FORM
   ========================================================================== */
#contact,
.contact-section {
    padding: 30px 10% 50px;
    min-height: calc(100vh - 80px);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 30px;
    align-items: start;
    margin-bottom: 0;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info-box {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-align: left !important;
    gap: 16px;
    padding: 16px 20px;
    text-decoration: none;
    cursor: pointer;
    background: rgba(8, 27, 41, 0.7);
    border: 1.5px solid rgba(0, 238, 255, 0.2);
    border-radius: 12px;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.info-box:hover {
    transform: translateY(-5px);
    border-color: #0ef;
    box-shadow: 0 0 20px rgba(0, 238, 255, 0.25);
}

.info-box i {
    font-size: 26px;
    color: #0ef;
    background: rgba(0, 238, 255, 0.1);
    border: 1px solid rgba(0, 238, 255, 0.3);
    padding: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.info-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start !important;
    text-align: left !important;
}

.info-text h4 {
    font-size: 15px;
    color: #fff;
    margin-bottom: 2px;
    text-align: left !important;
}

.info-text p {
    font-size: 13.5px;
    color: #b0c4de;
    margin-bottom: 0;
    text-align: left !important;
}

.contact-form {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: rgba(8, 27, 41, 0.75);
    border: 1.5px solid rgba(0, 238, 255, 0.2);
    border-radius: 12px;
}

.contact-form .input-box {
    display: flex;
    gap: 15px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 16px;
    background: #041018;
    border: 1.5px solid rgba(0, 238, 255, 0.25);
    border-radius: 8px;
    color: #ededed;
    font-size: 14px;
    outline: none;
    transition: 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #0ef;
    box-shadow: 0 0 12px rgba(0, 238, 255, 0.35);
}

.contact-form textarea {
    resize: none;
}

.form-submit-btn {
    border: none;
    cursor: pointer;
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
    animation: none;
    opacity: 1;
}

.form-status {
    font-size: 14px;
    margin-top: 10px;
    display: none;
}

.form-status.success {
    display: block;
    color: #0ef;
    text-shadow: 0 0 8px rgba(0, 238, 255, 0.4);
}

.form-status.error {
    display: block;
    color: #ff4d4d;
}

/* ==========================================================================
   11. FOOTER & COPYRIGHT
   ========================================================================== */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 18px 10%;
    background: rgba(4, 16, 24, 0.95);
    border-top: 1px solid rgba(0, 238, 255, 0.2);
    box-shadow: 0 -4px 20px rgba(0, 238, 255, 0.08);
}

.footer-text {
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
}

.footer-text p {
    font-size: 14.5px;
    color: #ededed;
    letter-spacing: 0.5px;
}

.footer-text p span {
    color: #0ef;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(0, 238, 255, 0.4);
}

.footer-iconTop {
    margin: 0 auto;
}

.footer-iconTop a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 8px;
    background: #0ef;
    border-radius: 8px;
    text-decoration: none;
    transition: 0.4s ease;
    box-shadow: 0 0 10px #0ef;
}

.footer-iconTop a:hover {
    box-shadow: 0 0 5px cyan, 0 0 20px cyan;
    transform: translateY(-3px);
}

.footer-iconTop a i {
    font-size: 22px;
    color: #081b29;
}

/* ==========================================================================
   12. RESPONSIVE DESIGN & MOBILE BREAKPOINTS
   ========================================================================== */
@media (max-width: 991px) {
    .header {
        padding: 15px 5%;
    }
    .navbar {
        align-items: center;
    }
    .nav-row {
        gap: 12px;
    }
    .home {
        flex-direction: column-reverse;
        justify-content: center;
        text-align: center;
        padding-top: 160px;
        gap: 40px;
    }
    .home-content {
        max-width: 100%;
    }
    .img-box {
        width: 300px;
        height: 300px;
    }
}

@media (max-width: 900px) {
    .project-card {
        height: auto;
    }
    .project-card .img-wrapper {
        height: 240px;
    }
    .project-card .card-info {
        height: auto;
    }
    .experience-timeline {
        grid-template-columns: 1fr;
        row-gap: 25px;
    }
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .contact-form .input-box {
        flex-direction: column;
    }
}