* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: "Segoe UI", sans-serif;
    color: white;
    overflow-x: hidden;
}
h1, h2, h3 { font-weight: 600; }

/* HEADER BACKGROUND */
.header-section {
    background: linear-gradient(135deg, #150532, #341a7c 50%, #5128b3);
    padding: 90px 20px;
    text-align: center;
    animation: fadeIn 1.2s ease;
}

/* MAIN BACKGROUND */
.main-background {
    background: linear-gradient(to bottom,
        #0f1528,
        #111a34 25%,
        #0d1120 60%,
        #000000 100%
    );
    padding-bottom: 80px;
    min-height: 100vh;
}

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

/* HEADER CONTENT */
.headshot {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 0 20px rgba(255,255,255,0.3);
}

.cert-badges img {
    width: 70px;
    margin: 10px;
    cursor: pointer;
    opacity: 0.85;
    transition: 0.3s;
}
.cert-badges img:hover { opacity: 1; transform: scale(1.8); }

.cert-badges {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}
.cert-badges div { min-width: 160px; }

.badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    justify-content: center;
    align-items: flex-start;
    padding: 20px 0;
}

.credly-badge {
    background: #ffffff;
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* .credly-badge {
    background: linear-gradient(180deg, #ffffff, #fafafa);
    padding: 16px;
    border: 1px solid #eaeaea;
    border-radius: 16px;
    width: 220px;
    text-align: center;
} */

.credly-badge:hover {
    transform: translateY(-6px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.header-buttons button {
    margin: 10px;
    padding: 14px 30px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    background: #4ac0ff;
    color: black;
    font-weight: bold;
    transition: 0.3s;
}
.header-buttons button:hover {
    background: #82d8ff;
    transform: translateY(-3px);
}

/* PROJECTS SECTION */
.projects-section {
    padding: 60px 25px;
    text-align: center;
}

.project-grid {
    display: grid;
    /* grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); */
    /* grid-template-columns: repeat(2, 1fr); 2 cards per row */
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 35px;
    width: 100%;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    justify-items: center;
}

/* .project-card {
    background: rgba(255, 255, 255, 0.12);
    padding: 25px;
    border-radius: 20px;
    backdrop-filter: blur(8px);
    transition: 0.3s;
    animation: fadeUp 1s ease;
} */
.project-card {
    display: flex;
    background: rgba(255, 255, 255, 0.12); /* glass effect */
    padding: 25px;
    border-radius: 20px;
    backdrop-filter: blur(8px);
    transition: 0.3s;
    animation: fadeUp 1s ease;
    margin-bottom: 25px;
}
/* Left thumbnail */
.project-thumb {
    flex: 1;
    max-width: 33%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.project-thumb img {
    width: 100%;
    height: 100%;
    /* height: auto; */
    /* border-radius: 10px; */
    border-radius: 14px;
    object-fit: cover;
}
/* Right details area */
.project-details {
    flex: 2;
    /* padding-left: 20px; */
    padding-left: 25px;
    color: #ffffff; 
}
.project-title {
    font-size: 1.4rem;
    font-weight: 600;
    /* margin-bottom: 8px; */
    margin-bottom: 10px;
    color: #ffffff;
}

.project-description {
    font-size: 0.95rem;
    line-height: 1.5;
    /* margin-bottom: 15px;
    color: #444; */
    margin-bottom: 18px;
    color: #e8e8e8;
}
/* .tech-stack span {
    display: inline-block;
    background: #eef3ff;
    border: 1px solid #d5dfff;
    padding: 6px 10px;
    margin: 3px;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #333;
} */

/* Tech stack rectangles */
.tech-stack span {
    display: inline-block;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 6px 12px;
    margin: 4px 4px 0 0;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #ffffff;
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(25px); }
    to { opacity: 1; transform: translateY(0); }
}

.project-card:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.18);
}
/* .project-card:hover {
    transform: translateY(-4px);
} */
.project-icon {
    width: 60px;
    margin-bottom: 15px;
}

.project-card button {
    margin-top: 12px;
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    background: #4ac0ff;
    color: black;
    font-weight: bold;
    transition: 0.3s;
}
.project-card button:hover {
    background: #82d8ff;
}

/* EXPERIENCE TIMELINE */
.experience-section {
    padding: 60px 25px;
    text-align: center;
}

.timeline {
    position: relative;
    margin: 60px auto;
    max-width: 900px;
    padding: 20px 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #4ac0ff, #82d8ff);
    border-radius: 2px;
    opacity: 0.7;
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 25px 30px;
    display: flex;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.9s ease;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item.right { left: 50%; text-align: left; }
.timeline-item.left  { left: 0; text-align: right; justify-content: flex-end; }

.timeline-icon {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    color: white;
    box-shadow: 0 0 15px rgba(255,255,255,0.3);
    z-index: 20;
}

.icon-educator {
    background: linear-gradient(135deg, #6a00ff, #b44cff);
}
.icon-architect {
    background: linear-gradient(135deg, #009dff, #55d0ff);
}
.icon-datascience {
    background: linear-gradient(135deg, #ff6b00, #ff9d47);
}

.timeline-content {
    background: rgba(255,255,255,0.12);
    padding: 24px;
    border-radius: 18px;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 18px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, background 0.3s ease;
    position: relative;
    z-index: 10;
}

.timeline-item:hover .timeline-content {
    transform: scale(1.03);
    background: rgba(255,255,255,0.18);
}

@media (max-width: 750px) {
    .timeline-line { left: 25px; }

    .timeline-item {
        width: 100%;
        left: 0 !important;
        text-align: left !important;
        justify-content: flex-start !important;
        padding-left: 70px;
        position: relative;
        z-index: 5;
    }

    .timeline-icon {
        left: 25px;
        transform: translate(-50%, -50%);
    }
}

@media (max-width: 768px) {
    .project-grid {
        grid-template-columns: 1fr; /* 1 per row on mobile */
        padding: 0;
        margin: 0;
    }
    .project-card {
        flex-direction: column;
        padding: 20px;

    }

    .project-thumb {
        max-width: 100%;
        margin-bottom: 15px;
    }

    .project-details {
        width: 100%;
        padding-left: 0;
    }
}

/* CONTACT */
.contact-section {
    padding: 60px 25px;
    text-align: center;
}

/* Research Articles Section */
.research-section {
    padding: 60px 20px;
    text-align: center;
}

.research-section h2 {
    /* font-size: 2.2rem; */
    margin-bottom: 35px;
    font-weight: 600;
    color: white; /* #222; */
}

.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    max-width: 1100px;
    margin: 0 auto;
}

.research-card {
    background: #ffffff;
    /* background: whitesmoke; */
    border-radius: 14px;
    padding: 25px;
    text-align: left;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    transition: all 0.25s ease-in-out;
}

.research-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.research-content h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: #222;
    font-weight: 600;
}

.research-content p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
    margin-bottom: 20px;
}

/* Read More Button */
.research-btn {
    display: inline-block;
    padding: 10px 18px;
    background-color: #007bff;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s ease;
}

.research-btn:hover {
    background-color: #0056b3;
}




/* =========================
   MOBILE FULL-WIDTH RIBBON
========================= */

.mobile-ribbon-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 3000;
    background: rgba(0, 0, 0, 0.92);
    /* border-bottom: 1px solid #ffffff; */
    /* background: rgba(120, 120, 120, 0.6);
    backdrop-filter: blur(6px); */
    border-bottom: none;
    display: none;
}

/* Inner alignment */
.mobile-ribbon-inner {
    max-width: 1200px;
    margin: 0 auto;
    /* padding: 10px 16px; */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    height: 64px;
}

/* Logo */
.mobile-ribbon-logo img {
    height: 55px; /*64*/
    width: 55px;
    border-radius: 50%;
    object-fit: contain; /*cover, contain, fill*/
    background: #ffffff;
}

/* Burger button */
.burger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.burger span {
    display: block;
    width: 24px;
    height: 2.5px;
    margin: 4px 0;
    background: #ffffff;
    border-radius: 2px;
}

/* Dropdown menu */
.mobile-menu {
    display: none;
    background: rgba(0, 0, 0, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.mobile-menu a {
    display: block;
    padding: 14px 20px;
    color: #ffffff;
    text-decoration: none;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-menu a:last-child {
    border-bottom: none;
}

.mobile-menu a:hover {
    background: rgba(255, 255, 255, 0.12);
}
/* Close button inside mobile menu */
.menu-close {
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.1rem;
    text-align: right;
    cursor: pointer;
}

.menu-close:hover {
    background: rgba(255, 255, 255, 0.1);
}
/* =========================
   RESPONSIVE RULES
========================= */

@media (max-width: 768px) {
    .header-buttons {
        display: none;
    }

    .mobile-ribbon-nav {
        display: block;
    }

    /* Prevent content hiding under fixed ribbon */
    body {
        padding-top: 64px;
    }
}
