/* ================================================== */
/* === FINAL AND COMPLETE CSS CODE FOR PORTFOLIO === */
/* ================================================== */

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

:root {
    --bg-color: #081b29;
    --second-bg-color: #112e42;
    --text-color: #ededed;
    --main-color: #00abf0;
}

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

html {
    font-size: 62.5%; /* Makes 1rem = 10px */
    overflow-x: hidden;
    scroll-behavior: smooth; /* PURE CSS SMOOTH SCROLL */
}

body {
    background: var(--bg-color);
    color: var(--text-color);
}

section {
    min-height: 100vh;
    padding: 10rem 9% 2rem;
}

.section-title {
    font-size: 5rem;
    text-align: center;
    margin-bottom: 4rem;
    animation: fadeInDown 1s ease-out; /* ON-LOAD ANIMATION */
}

.section-title span {
    color: var(--main-color);
}

/* ==================== ON-LOAD ANIMATIONS ==================== */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}


/* ==================== HEADER & NAVIGATION ==================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 9%;
    background: var(--bg-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    transition: .3s;
}

.logo {
    font-size: 2.5rem;
    color: var(--text-color);
    font-weight: 600;
    animation: fadeInDown 0.5s ease-out;
}

.navbar a {
    font-size: 1.7rem;
    color: var(--text-color);
    font-weight: 500;
    margin-left: 3.5rem;
    transition: .3s;
    animation: fadeInDown 0.5s ease-out;
}

.navbar a:hover,
.navbar a.active {
    color: var(--main-color);
}

/* ==================== HOME SECTION (WITH IMAGE) ==================== */
.home {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.home-content {
    animation: fadeInLeft 1s ease-out;
    max-width: 600px;
}

.home-content h3 {
    font-size: 3.2rem;
    font-weight: 700;
}

.css-typing {
    position: relative;
    width: fit-content;
}
.css-typing::after {
    content: '';
    position: absolute;
    right: -5px;
    width: 2px;
    height: 100%;
    background-color: var(--main-color);
    animation: blink 0.7s infinite;
}
@keyframes blink {
    50% { opacity: 0; }
}

.home-content h1 {
    font-size: 5.6rem;
    font-weight: 700;
    line-height: 1.3;
}

.home-content p {
    font-size: 1.6rem;
    margin: 2rem 0 4rem;
}

.home-content .social-media a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    background: transparent;
    border: .2rem solid var(--main-color);
    border-radius: 50%;
    font-size: 2rem;
    color: var(--main-color);
    margin: 0 1.5rem 3rem 0;
    transition: .5s ease;
}

.home-content .social-media a:hover {
    background: var(--main-color);
    color: var(--bg-color);
    box-shadow: 0 0 1rem var(--main-color);
}

.btn {
    display: inline-block;
    padding: 1.2rem 2.8rem;
    background: var(--main-color);
    border-radius: 4rem;
    box-shadow: 0 0 1rem var(--main-color);
    font-size: 1.6rem;
    color: var(--bg-color);
    letter-spacing: .1rem;
    font-weight: 600;
    transition: .5s ease;
}

.btn:hover {
    box-shadow: none;
}

/* Styles for the profile picture */
.home-img {
    width: 35vw;
    height: 35vw;
    max-width: 400px;
    max-height: 400px;
    border-radius: 50%;
    overflow: hidden;
    border: .8rem solid var(--main-color);
    box-shadow: 0 0 2rem var(--main-color);
    animation: fadeInRight 1s ease-out 0.5s;
    animation-fill-mode: backwards; /* Start animation smoothly */
}

.home-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==================== RESUME SECTION ==================== */
.resume {
    background: var(--second-bg-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.resume-content {
    animation: fadeInUp 1s ease-out;
}

.resume-content p {
    font-size: 1.8rem;
    max-width: 70rem;
    margin-bottom: 3rem;
}

/* ==================== EXPERIENCE (TIMELINE) SECTION ==================== */
.experience {
    background: var(--bg-color);
    position: relative;
}
.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeInUp 1s ease-out;
}
.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background-color: var(--main-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
    border-radius: 3px;
    animation: moveline 4s linear forwards;
}

@keyframes moveline {
    0% { height: 0; }
    100% { height: 100%; }
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}
.timeline-item:nth-child(odd) { left: 0; }
.timeline-item:nth-child(even) { left: 50%; }
.timeline-dot {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--text-color);
    border: 4px solid var(--main-color);
    top: 32px;
    border-radius: 50%;
    z-index: 1;
}
.timeline-item:nth-child(even) .timeline-dot { left: -10px; }
.timeline-date { font-size: 1.8rem; font-weight: 600; color: var(--main-color); margin-bottom: 1rem; }
.timeline-content { padding: 2rem 3rem; background: var(--second-bg-color); position: relative; border-radius: 6px; }
.timeline-content h3 { font-size: 2.2rem; }
.timeline-content p { font-size: 1.6rem; font-style: italic; margin-bottom: 1rem; }
.timeline-content ul { list-style-position: inside; font-size: 1.5rem; }
.timeline-content ul li { margin-bottom: 0.5rem; }

/* Proof links in timeline (with image preview) */
.timeline-proof {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.timeline-proof > div {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.proof-link {
    color: var(--main-color);
    font-size: 1.4rem;
    font-weight: 500;
    transition: letter-spacing 0.3s ease;
}

.proof-link:hover {
    text-decoration: underline;
    letter-spacing: .5px;
}

.proof-link i {
    margin-right: 0.5rem;
}

.certificate-preview {
    width: 100px;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}
.certificate-preview:hover {
    transform: scale(1.1);
}


/* ==================== NEW CERTIFICATE CARD STYLES ==================== */
.certificates {
    background: var(--second-bg-color);
}

.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
}

.certificate-card {
    background: #fff;
    color: #333;
    border-radius: 15px;
    box-schadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.certificate-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 171, 240, 0.2);
}

.card-header {
    padding: 3rem 2rem;
    color: #fff;
}
.card-header h2 {
    font-size: 2.8rem;
    font-weight: 700;
    margin: 0;
}

/* Custom colors for each card header */
.card-header.color-1 { background-color: #4285F4; } /* Google Blue */
.card-header.color-2 { background-color: #34A853; } /* Green */
.card-header.color-3 { background-color: #1c4a78; } /* Cisco Blue */


.card-body {
    padding: 2.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-body h3 {
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--bg-color);
    margin-bottom: 1rem;
}

.card-description {
    font-size: 1.5rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.card-details {
    font-size: 1.4rem;
    color: #555;
    margin-bottom: 0.5rem;
}

.credential-link {
    display: inline-block;
    margin-top: 2rem;
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--main-color);
    text-decoration: none;
    transition: letter-spacing 0.3s ease;
}

.credential-link:hover {
    letter-spacing: 0.5px;
    text-decoration: underline;
}

.credential-link i {
    margin-left: 0.5rem;
    font-size: 1.2rem;
}


/* ==================== FOOTER ==================== */
.footer { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    flex-wrap: wrap; 
    padding: 2rem 9%; 
    background: var(--bg-color); 
}
.footer-text p { 
    font-size: 1.6rem; 
}
.footer-iconTop a { 
    display: inline-flex; 
    justify-content: center; 
    align-items: center; 
    padding: .8rem; 
    background: var(--main-color); 
    border-radius: .8rem; 
    transition: .5s ease; 
}
.footer-iconTop a:hover { 
    box-shadow: 0 0 1rem var(--main-color); 
}
.footer-iconTop a i { 
    font-size: 2.4rem; 
    color: var(--bg-color); 
}


/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 1200px) { html { font-size: 55%; } }
@media (max-width: 991px) { .header, section, .footer { padding-left: 3%; padding-right: 3%; } }

@media (max-width: 768px) {
    /* Stack home section on mobile */
    .home {
        flex-direction: column-reverse;
        justify-content: center;
        text-align: center;
    }
    .home-content {
        max-width: 100%;
    }
    .home-img {
        width: 70vw;
        height: 70vw;
        max-width: 280px;
        max-height: 280px;
        margin-bottom: 3rem;
    }

    /* Adjust timeline for mobile */
    .timeline::after { left: 31px; }
    .timeline-item { width: 100%; padding-left: 70px; padding-right: 25px; }
    .timeline-item:nth-child(even) { left: 0; }
    .timeline-dot { left: 10px; }
}
@media (max-width: 450px) { html { font-size: 50%; } .home-content h1 { font-size: 5rem; } }