/* ----- POPPINS FONT Link ----- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* ----- VARIABLES ----- */
:root{
    --body-color: rgb(250, 250, 250);
    --color-white: rgb(255, 255, 255);

    --text-color-second: rgb(68, 68, 68);
    --text-color-third: rgb(30, 159, 171);

    --first-color: rgb(110, 87, 224);
    --first-color-hover: rgb(40, 91, 212);

    --second-color: rgb(0, 201, 255);
    --third-color: rgb(192, 166, 49);
    --first-shadow-color: rgba(0, 0, 0, 0.1);

}

body.dark-mode {
    --body-color: #1B1F25;
    --color-white: #292F38;
    --text-color-second: #CBD5E1;
    --text-color-third: #35C6D0;
    --first-shadow-color: rgba(15, 18, 24, 0.32);

    --theme-bg: #1B1F25;
    --theme-surface: #22272F;
    --theme-card: #292F38;
    --theme-card-elevated: #323944;
    --theme-text-main: #F1F5F9;
    --theme-text-secondary: #CBD5E1;
    --theme-text-muted: #94A3B8;
    --theme-border: #3B4350;
    --theme-primary: #8B7CF6;
    --theme-secondary: #35C6D0;
    --theme-hover: #A69BFF;
    --theme-success: #4ADE80;
    --theme-warning: #FBBF24;
    --theme-input: #252B33;
    --theme-input-border: #46515F;
    --theme-modal: rgba(15, 18, 24, 0.94);
    --theme-footer: #181C22;
    --theme-timeline: #596575;
    --theme-year: #303742;
    --theme-network: #526071;
    --theme-network-node: #35C6D0;
    --theme-tag-bg: #3A3F63;
    --theme-tag-text: #DDD9FF;
    --theme-button: #6F63D9;
    --theme-button-hover: #8579F2;
    --theme-glow: rgba(53, 198, 208, 0.16);
}

body,
nav,
.btn,
.project-card,
.certificate-card,
.journey-card,
.skills-box,
.contact-card,
.contact-form-card,
.input-field,
.contact-textarea,
footer {
    transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

/* ================= COMPLETE DARK MODE ================= */
body.dark-mode {
    color: #e2e8f0;
}

body.dark-mode .top-header h1,
body.dark-mode .featured-name,
body.dark-mode .about-info h3,
body.dark-mode .journey-content h3,
body.dark-mode .project-info h3,
body.dark-mode .certificate-info h3,
body.dark-mode .contact-card h2,
body.dark-mode .form-title h2,
body.dark-mode .nav-logo span {
    color: #f8fafc;
}

body.dark-mode .featured-text-info p,
body.dark-mode .about-info p,
body.dark-mode .journey-content li,
body.dark-mode .project-info p,
body.dark-mode .contact-role,
body.dark-mode .certificate-meta p,
body.dark-mode .form-note {
    color: #cbd5e1;
}

body.dark-mode .skills-box,
body.dark-mode .project-card,
body.dark-mode .certificate-card,
body.dark-mode .journey-card,
body.dark-mode .contact-card,
body.dark-mode .contact-form-card {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

body.dark-mode .skills-list span,
body.dark-mode .project-tags span {
    background: #334155;
    color: #e2e8f0;
}

body.dark-mode .journey-date {
    background: #312e81;
    color: #c4b5fd;
}

body.dark-mode .input-field,
body.dark-mode .contact-textarea {
    background: #0f172a;
    color: #f8fafc;
    border-color: #475569;
}

body.dark-mode .input-field::placeholder,
body.dark-mode .contact-textarea::placeholder {
    color: #94a3b8;
}

body.dark-mode .nav-menu {
    background-color: var(--body-color);
}

body.dark-mode footer {
    background: #0b1120;
}

/* ----- BASE ----- */
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

/* ----- SMOOTH SCROLL ----- */
html{
    scroll-behavior: smooth;
}

/* ----- CHANGE THE SCROLL BAR DESIGN ----- */
::-webkit-scrollbar{
    width: 10px;
    border-radius: 25px;
}
::-webkit-scrollbar-track{
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb{
    background: #ccc;
    border-radius: 30px;
}
::-webkit-scrollbar-thumb:hover{
    background: #bbb;
}


/* ---##-- REUSABLE CSS --##--- */

/* ----- GLOBAL BUTTON DESIGN ----- */
.btn{
    font-weight: 500;
    padding: 12px 20px;
    background: #efefef;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: .4s;
}
.btn>i{
    margin-left: 10px;
}
.btn:hover{
    background: var(--second-color);
    color: var(--color-white);
}

/* ----- GLOBAL ICONS DESIGN ----- */
i{
    font-size: 16px;
}

/* ------- BASE -------- */
body{
    background: var(--body-color);
}
.container{
    width: 100%;
    position: relative;
}

/* ----- NAVIGATION BAR ----- */
nav{
    position: fixed;
    display: flex;
    justify-content: space-between;
    width: 100%;
    height: 90px;
    line-height: 90px;
    background: var(--body-color);
    padding-inline: 9vw;
    gap: 18px;
    transition: .3s;
    z-index: 100;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    margin-left: 0;
}

.theme-toggle {
    height: 46px;
    border: 1px solid #dce3ef;
    border-radius: 14px;
    background: #f1f5fb;
    color: #172033;
    cursor: pointer;
    transition: 0.3s ease;
}

.theme-toggle {
    width: 50px;
    font-size: 18px;
}

.nav-menu {
    flex: 1;
    justify-content: center;
    min-width: 0;
}

.nav_menu_list {
    justify-content: center;
}

.theme-toggle:hover {
    background: var(--second-color);
    border-color: var(--second-color);
    color: #ffffff;
}

body.dark-mode .theme-toggle {
    background: #1e293b;
    border-color: #475569;
    color: #e2e8f0;
}
.nav-logo{
   position: relative;
}
.nav-name{
    font-size: 30px;
    font-weight: 600;
    color: var(--text-color-third);
}
.nav-logo span{
    position: absolute;
    top: -15px;
    right: -20px;
    font-size: 5em;
    color: var(--text-color-second);
}
.nav-menu, .nav_menu_list{
    display: flex;
}
.nav-menu-btn {
    display: none;
    border: 0;
    background: transparent;
    color: var(--text-color-second);
    cursor: pointer;
    padding: 8px;
}
.nav-menu-btn i {
    font-size: 24px;
}
.nav-menu .nav_list{
    list-style: none;
    position: relative;
}
/* ----- NAVIGATION ANIMATED LINE ----- */

.nav-menu {
    position: relative;
}

.nav-link {
    position: relative;
    text-decoration: none;
    color: var(--text-color-second);
    font-weight: 500;
    padding-inline: 10px;
    margin-inline: 10px;
    white-space: nowrap;
}

/* Keep the medium-width navigation on one line. */
@media only screen and (max-width: 1150px) and (min-width: 901px) {
    nav {
        padding-inline: 4vw;
        gap: 12px;
    }

    .nav-name {
        font-size: 26px;
    }

    .nav-logo span {
        top: -13px;
        right: -17px;
        font-size: 4.3em;
    }

    .nav-menu {
        margin-inline: 8px;
    }

    .journey-prefix {
        display: none;
    }

    .nav-link {
        padding-inline: 7px;
        margin-inline: 6px;
    }

    .nav-button .btn {
        padding: 10px 14px;
        white-space: nowrap;
    }
}

/* Animated line */
.nav-link::after {
    content: "";
    position: absolute;

    left: 50%;
    bottom: -10px;

    width: 0;
    height: 3px;

    background: var(--first-color);
    border-radius: 10px;

    transform: translateX(-50%);
    transition: width 0.3s ease;
}

/* Hover */
.nav-link:hover::after {
    width: 70%;
}

/* Active link */
.active-link {
    color: var(--first-color);
}


/* ----- WRAPPER DESIGN ----- */
.wrapper{
    padding-inline: 10vw;
}

/* ----- FEATURED BOX ----- */
.featured-box{
    position: relative;
    display: flex;
    height: 100vh;
    min-height: 700px;
}

/* ----- FEATURED TEXT BOX ----- */
.featured-text{
    position: relative;
    display: flex;
    justify-content: center;
    align-content: center;
    min-height: 80vh;
    flex-direction: column;
    width: 50%;
    padding-left: 20px;
}
.featured-text-card span{
    background: var(--third-color);
    color: var(--color-white);
    padding: 3px 8px;
    font-size: 12px;
    border-radius: 5px;
}
.featured-name{
    font-size: 50px;
    font-weight: 600;
    color: var(--text-color-second);
    margin-block: 20px;
}
.typedText{
    text-transform: capitalize;
    color: var(--text-color-third);
}
.featured-text-info{
    font-size: 15px;
    margin-bottom: 30px;
    color: var(--text-color-second);
}
.featured-text-btn{
    display: flex;
    gap: 20px;
}
.featured-text-btn>.blue-btn{
    background: var(--first-color);
    color: var(--color-white);
}
.featured-text-btn>.blue-btn:hover{
    background: var(--first-color-hover);
}
.social_icons{
    display: flex;
    margin-top: 5em;
    gap: 30px;
    flex-wrap: wrap;
}
.icon{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}
.icon:hover{
    color: var(--first-color);
}

/* ----- FEATURED IMAGE BOX ----- */
.featured-image{
    display: flex;
    justify-content: right;
    align-content: center;
    min-height: 80vh;
    width: 50%;
}
.image{
    margin: auto 0;
    width: 380px;
    height: 380px;
    border-radius: 55% 45% 55% 45%;
    overflow: hidden;
    animation: imgFloat 7s ease-in-out infinite;
}
.image img{
    width: 380px;
    height: 380px;
    object-fit: cover;
}
@keyframes imgFloat {
    50%{
        transform: translateY(10px);
        border-radius: 45% 55% 45% 55%;
    }
}


/* ----- ANIMATED SCROLL DOWN ----- */

.scroll-btn{
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);

    display: flex;
    justify-content: center;
    align-items: center;

    width: 160px;
    height: 52px;

    gap: 8px;

    text-decoration: none;

    color: var(--text-color-second);
    background: var(--color-white);

    border: 2px solid transparent;
    border-radius: 30px;

    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);

    transition: all 0.35s ease;

    animation: scrollPulse 2s ease-in-out infinite;
}


/* Arrow */

.scroll-btn i{
    font-size: 20px;

    transition: all 0.35s ease;

    animation: arrowBounce 1.5s ease-in-out infinite;
}


/* Hover */

.scroll-btn:hover{
    background: var(--first-color);
    color: white;

    border-color: var(--first-color);

    transform: translateX(-50%) translateY(-6px);

    box-shadow: 0 12px 25px rgba(110, 87, 224, 0.30);

    animation: none;
}


/* Arrow hover */

.scroll-btn:hover i{
    transform: translateY(5px);

    animation: none;
}


/* Button floating animation */

@keyframes scrollPulse {

    0%, 100%{
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
    }

    50%{
        box-shadow: 0 10px 25px rgba(110, 87, 224, 0.25);
    }

}


/* Arrow bouncing */

@keyframes arrowBounce {

    0%, 100%{
        transform: translateY(0);
    }

    50%{
        transform: translateY(5px);
    }

}


.scroll-btn i{
    font-size: 20px;
}

/* ----- MAIN BOX ----- */
.section{
    padding-block: 5em;
}
.row{
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 50px;
}
.col{
    display: flex;
    width: 50%;
}

/* -- ## --- RESUABLE CSS -- ## -- */
.top-header{
    text-align: center;
    margin-bottom: 5em;
}
.top-header h1{
    font-weight: 600;
    color: var(--text-color-second);
    margin-bottom: 10px;
}
.top-header span{
    color: #999;
}

h3{
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color-second);
    margin-bottom: 15px;
}

/* ----- ABOUT INFO ----- */
.about-info{
    position: relative;
    display: flex;
    align-items: center;
    flex-direction: column;
    padding-block: 30px 70px;
    padding-inline: 20px;
    width: 100%;
    background: var(--color-white);
    box-shadow: 1px 8px 10px 2px var(--first-shadow-color);
    border-radius: 20px;
}
.about-info p{
    text-align: center;
    font-size: 15px;
    color: #777;
}
.about-btn button{
    position: absolute;
    right: 20px;
    bottom: 20px;
    background: var(--first-color);
    color: var(--color-white);
    border-radius: 30px;
}
.about-btn button:hover{
    background: var(--first-color-hover);
}

/* ----- ABOUT / SKILLS BOX ----- */
.skills-box{
    margin: 10px;
}
.skills-header{
    margin-bottom: 30px;
}
.skills-list{
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.skills-list span{
    font-size: 14px;
    background: var(--first-color);
    color: var(--color-white);
    padding: 2px 10px;
    border-radius: 5px;
}

/* =====================================================
   PROJECTS
===================================================== */

.project-container {
    width: 100%;
    max-width: 1300px;
    margin: 50px auto 0;

    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}


/* ================= Project Card ================= */

.project-card {
    background: #ffffff;

    border-radius: 20px;
    overflow: hidden;

    border: 1px solid #e8e8e8;

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);

    transition: all 0.35s ease;
}


/* ================= Project Hover ================= */

.project-card:hover {
    transform: translateY(-8px);

    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}


/* ================= Project Image ================= */

.project-image {
    position: relative;

    width: 100%;
    height: 150px;

    overflow: hidden;

    cursor: pointer;

    background: #f5f5f5;
}


.project-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    display: block;

    transition: transform 0.4s ease;
}


.project-card:hover .project-image img {
    transform: scale(1.05);
}


/* ================= Hover Overlay ================= */

.project-overlay {
    position: absolute;

    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(40, 40, 40, 0.65);

    opacity: 0;

    transition: opacity 0.3s ease;
}


.project-image:hover .project-overlay {
    opacity: 1;
}


/* ================= Open To Drive ================= */

.project-drive-btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    padding: 10px 18px;

    background: #ffffff;

    color: var(--first-color);

    border-radius: 10px;

    text-decoration: none;

    font-size: 14px;

    font-weight: 600;

    transition: all 0.3s ease;
}


.project-drive-btn i {
    font-size: 16px;
}


.project-drive-btn:hover {
    background: var(--first-color);

    color: #ffffff;

    transform: translateY(-2px);
}


/* ================= Project Info ================= */

.project-info {
    padding: 5px;
}


.project-info h3 {
    margin: 0 0 8px;

    font-size: 14px;

    font-weight: 700;

    color: #333333;
}


.project-info p {
    margin: 0;

    font-size: 12px;

    line-height: 1.6;

    color: #777777;
}


/* ================= Project Tags ================= */

.project-tags {
    display: flex;

    flex-wrap: wrap;

    gap: 6px;

    margin-top: 12px;
}


.project-tags span {
    padding: 4px 9px;

    background: #eef2ff;

    color: #4f46e5;

    border-radius: 6px;

    font-size: 11px;

    font-weight: 500;
}


/* =====================================================
   PROJECTS RESPONSIVE
===================================================== */

@media only screen and (max-width: 1100px) {

    .project-container {
        grid-template-columns: repeat(3, 1fr);
    }

}


@media only screen and (max-width: 900px) {

    .project-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

}


@media only screen and (max-width: 600px) {

    .project-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .project-image {
        height: 130px;
    }

}




/* =====================================================
   CREATIVE CONTACT SECTION
===================================================== */

.contact-section {
    position: relative;
    overflow: hidden;
    padding-bottom: 7em;
}

/* ================= HEADER ================= */

.contact-header {
    position: relative;
    z-index: 2;
}

.contact-header h1 {
    font-size: 35px;
}

.contact-header span {
    color: #999;
}


/* ================= CONTACT WRAPPER ================= */

.contact-wrapper {
    position: relative;
    z-index: 2;

    width: 85%;
    max-width: 1200px;

    margin: 50px auto 0;

    display: grid;
    grid-template-columns: 0.9fr 1.1fr;

    gap: 35px;
}


/* ================= LEFT SIDE ================= */

.contact-left {
    display: flex;
    flex-direction: column;
    gap: 25px;
}


/* ================= CONTACT CARD ================= */

.contact-card {
    position: relative;

    padding: 40px 30px;

    background: var(--second-color);

    border-radius: 25px;

    text-align: center;

    color: white;

    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);

    overflow: hidden;
}

.contact-card::before {
    content: "";

    position: absolute;

    width: 180px;
    height: 180px;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.08);

    top: -80px;
    right: -60px;
}

.contact-card::after {
    content: "";

    position: absolute;

    width: 120px;
    height: 120px;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.06);

    bottom: -50px;
    left: -40px;
}


/* ================= AVATAR ================= */

.contact-avatar {
    position: relative;
    z-index: 2;

    width: 95px;
    height: 95px;

    margin: 0 auto 18px;

    border-radius: 50%;

    background: white;

    padding: 4px;

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.18);

    overflow: hidden;

    transition: all 0.4s ease;
}

.contact-avatar img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    border-radius: 50%;

    display: block;
    
    transition: transform 0.4s ease;
}

.contact-card:hover .contact-avatar {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.contact-card:hover .contact-avatar img {
    transform: scale(1.08);
}

.contact-card h2 {
    position: relative;
    z-index: 2;

    font-size: 26px;
    margin-bottom: 8px;
}

.contact-role {
    position: relative;
    z-index: 2;

    font-size: 13px;

    opacity: 0.9;

    margin-bottom: 25px;
}


/* ================= EMAIL ================= */

.contact-email {
    position: relative;
    z-index: 2;

    display: flex;
    justify-content: center;
    align-items: center;

    gap: 10px;

    font-size: 14px;

    margin-bottom: 25px;
}

.contact-email i {
    font-size: 17px;
}


/* ================= CONTACT BUTTONS ================= */

.contact-buttons {
    position: relative;
    z-index: 2;

    display: flex;
    justify-content: center;

    gap: 10px;

    flex-wrap: wrap;
}

.contact-btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    padding: 11px 17px;

    border-radius: 10px;

    text-decoration: none;

    font-size: 13px;
    font-weight: 600;

    cursor: pointer;

    transition: 0.3s;
}

.primary-btn {
    background: white;
    color: var(--first-color);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.15);

    color: white;

    border: 1px solid rgba(255, 255, 255, 0.3);
}

.contact-btn:hover {
    transform: translateY(-3px);
}


/* ================= SOCIAL LINKS ================= */

.social-links {
    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 12px;
}

.social-link {
    display: flex;

    align-items: center;

    gap: 12px;

    padding: 13px 15px;

    background: white;

    border: 1px solid #eee;

    border-radius: 12px;

    text-decoration: none;

    color: var(--text-color-second);

    font-size: 13px;
    font-weight: 500;

    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.04);

    transition: 0.3s;
}

.social-link i {
    font-size: 17px;
}

.social-link:hover {
    transform: translateY(-4px);

    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);

    color: var(--first-color);
}


/* ================= CONTACT FORM ================= */

.contact-form-card {
    background: white;

    border: 1px solid #e8e8e8;

    border-radius: 25px;

    padding: 35px;

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.form-title {
    margin-bottom: 25px;
}

.form-title span {
    color: var(--first-color);

    font-size: 13px;

    font-weight: 600;
}

.form-title h2 {
    margin-top: 5px;

    font-size: 25px;

    color: var(--text-color-second);
}


/* ================= INPUTS ================= */

.contact-form-card .form-inputs {
    display: flex;

    gap: 12px;

    margin-bottom: 12px;
}

.contact-form-card .input-field {
    width: 50%;

    height: 55px;

    background: #fafafa;

    border: 1px solid #ddd;

    border-radius: 12px;

    padding: 0 18px;

    outline: none;

    transition: 0.3s;
}

.contact-form-card .input-field:focus,
.contact-textarea:focus {
    border-color: var(--first-color);

    background: white;

    box-shadow: 0 0 0 3px rgba(110, 87, 224, 0.08);
}


/* ================= TEXTAREA ================= */

.contact-textarea {
    width: 100%;

    height: 200px;

    background: #fafafa;

    border: 1px solid #ddd;

    border-radius: 12px;

    padding: 16px 18px;

    resize: vertical;

    outline: none;

    transition: 0.3s;

    font-family: 'Poppins', sans-serif;
}


/* ================= SEND BUTTON ================= */

.send-message-btn {
    width: 100%;

    margin-top: 15px;

    padding: 14px 20px;

    border: none;

    border-radius: 12px;

    background: var(--first-color);

    color: white;

    display: flex;

    justify-content: space-between;

    align-items: center;

    cursor: pointer;

    font-weight: 600;

    transition: 0.3s;
}

.send-message-btn:hover {
    background: var(--first-color-hover);

    transform: translateY(-3px);
}

.send-message-btn i {
    transition: 0.3s;
}

.send-message-btn:hover i {
    transform: translateX(5px);
}


/* ================= FORM NOTE ================= */

.form-note {
    margin-top: 15px;

    font-size: 11px;

    color: #999;

    text-align: center;
}

.form-note i {
    margin-right: 5px;
}


/* =====================================================
   FLOATING SHAPES
===================================================== */

.contact-shape {
    position: absolute;

    border-radius: 50%;

    filter: blur(1px);

    opacity: 0.5;

    animation: contactFloat 8s ease-in-out infinite;
}

.shape-1 {
    width: 100px;
    height: 100px;

    background: rgba(110, 87, 224, 0.08);

    top: 15%;
    left: 5%;
}

.shape-2 {
    width: 70px;
    height: 70px;

    background: rgba(0, 201, 255, 0.1);

    top: 50%;
    right: 7%;

    animation-delay: 1s;
}

.shape-3 {
    width: 45px;
    height: 45px;

    background: rgba(192, 166, 49, 0.12);

    bottom: 15%;
    left: 12%;

    animation-delay: 2s;
}

.shape-4 {
    width: 60px;
    height: 60px;

    border: 2px solid rgba(110, 87, 224, 0.12);

    bottom: 10%;
    right: 15%;

    animation-delay: 3s;
}

@keyframes contactFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-25px) rotate(15deg);
    }
}


/* =====================================================
   CONTACT RESPONSIVE
===================================================== */

@media only screen and (max-width: 900px) {

    .contact-wrapper {
        width: 100%;

        grid-template-columns: 1fr;
    }

}

@media only screen and (max-width: 540px) {

    .contact-form-card {
        padding: 25px 20px;
    }

    .contact-form-card .form-inputs {
        flex-direction: column;
    }

    .contact-form-card .input-field {
        width: 100%;
    }

    .social-links {
        grid-template-columns: 1fr;
    }

    .contact-card {
        padding: 35px 20px;
    }

}


/* ----- FOOTER BOX ----- */
footer{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    row-gap: 30px;
    background: #F8F8F8;
    padding-block: 40px 60px;
}
.top-footer p{
    font-size: 25px;
    font-weight: 600;
}
.middle-footer .footer-menu{
    display: flex;
}
.footer_menu_list{
    list-style: none;
}
.footer_menu_list a{
    text-decoration: none;
    color: var(--text-color-second);
    font-weight: 500;
    margin-inline: 20px;
}
.footer-social-icons{
    display: flex;
    gap: 30px;   
}
.bottom-footer{
    font-size: 14px;
    margin-top: 10px;
}


/* ----- MEDIA QUERY == 1024px / RESPONSIVE ----- */
@media only screen and (max-width: 1024px){
    .featured-text{
        padding: 0;
    }
    .image, .image img{
        width: 320px;
        height: 320px;
    }
}

/* ----- MEDIA QUERY == 900px / RESPONSIVE ----- */
@media only screen and (max-width: 900px) {
    .nav-actions {
        margin-left: 0;
    }

    .nav-button{
        display: none;
    }
    .nav-menu.responsive{
        left: 0;
    }
    .nav-menu{
        position: fixed;
        top: 80px;
        left: -100%;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background: rgba(255, 255, 255, 0.7);
        backdrop-filter: blur(20px);
        width: 100%;
        min-height: 450px;
        height: 90vh;
        transition: .3s;
    }
    .nav_menu_list{
        flex-direction: column;
    }
    .nav-menu-btn{
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .featured-box{
        flex-direction: column;
        justify-content: center;
        height: 100vh;
    }
    .featured-text{
        width: 100%;
        order: 2;
        justify-content: center;
        align-content: flex-start;
        min-height: 60vh;
    }
    .social_icons{
        margin-top: 2em;
    }
    .featured-image{
        order: 1;
        justify-content: center;
        min-height: 150px;
        width: 100%;
        margin-top: 65px;
    }
    .image, .image img{
        width: 150px;
        height: 150px;
    }
    .row{
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 50px;
    }
    .col{
        display: flex;
        justify-content: center;
        width: 100%;
    }
    .about-info{
        width: 100%;
    }
    .project-container{
        justify-content: center;
    }
}

/* ----- MEDIA QUERY == 540px / RESPONSIVE ----- */

@media only screen and (max-width: 540px){
    .featured-name{
        font-size: 40px;
    }
    .form-inputs{
        flex-direction: column;
    }
    .input-field{
        width: 100%;
    }
}






#about .row > .col:last-child {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px 20px;
    align-content: start;
}

#about .row > .col:last-child .skills-box {
    margin: 0;
}


@media only screen and (max-width: 900px) {
    #about .row > .col:last-child {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media only screen and (max-width: 540px) {
    #about .row > .col:last-child {
        grid-template-columns: 1fr;
    }
}

#projects .project-container,
#contact .row {
    width: 85%;
    max-width: 1200px;
    margin: 0 auto;
}

@media only screen and (max-width: 900px) {
    #projects .project-container,
    #contact .row {
        width: 100%;
    }
}


/* =====================================================
   MY JOURNEY - TIMELINE
   ===================================================== */

.journey-timeline {
    position: relative;
    width: 100%;
    max-width: 1100px;
    margin: 60px auto 0;
    padding: 10px 0 40px;
}

/* Vertical Timeline Line */
.journey-timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    background: #d9e1f2;
    transform: translateX(-50%);
    border-radius: 10px;
}

/* Journey Item */
.journey-item {
    position: relative;
    width: 100%;
    display: flex;
    margin-bottom: 40px;
}

/* Timeline Dot */
.journey-dot {
    position: absolute;
    left: 50%;
    top: 35px;

    width: 18px;
    height: 18px;

    background: #ffffff;
    border: 4px solid #6c5ce7;

    border-radius: 50%;

    transform: translateX(-50%);
    z-index: 5;

    box-shadow: 0 0 0 5px rgba(108, 92, 231, 0.08);
}

/* Journey Card */
.journey-card {
    position: relative;

    width: calc(50% - 45px);

    background: #ffffff;

    border: 1px solid #e4e8f0;
    border-radius: 22px;

    padding: 28px 30px;

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);

    transition: all 0.35s ease;
}




/* =====================================================
   JOURNEY INSTITUTION LOGO
===================================================== */

.journey-logo {
    position: absolute;

    top: 18px;
    right: 20px;

    width: 80px;
    height: 80px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #ffffff;

    border-radius: 50%;

    overflow: hidden;

    z-index: 3;

    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);

    border: 2px solid #f0f0f0;
}


.journey-logo img {
    width: 82%;
    height: 82%;

    object-fit: contain;

    display: block;

    border-radius: 50%;
}

/* Dark Mode additions. Light Mode remains unchanged above. */
body.dark-mode nav {
    background: var(--body-color);
    border-bottom-color: #334155;
}

body.dark-mode .nav-link,
body.dark-mode .nav-menu-btn,
body.dark-mode .nav-logo span {
    color: var(--text-color-second);
}

body.dark-mode .nav-menu {
    background-color: var(--body-color);
}

body.dark-mode .theme-toggle {
    background: #1e293b;
    border-color: #475569;
    color: #f8fafc;
}

body.dark-mode .theme-toggle:hover {
    background: var(--first-color);
    border-color: var(--first-color);
}

body.dark-mode .journey-timeline::before,
body.dark-mode .network-line {
    background: #475569;
}

body.dark-mode .journey-card,
body.dark-mode .skills-box,
body.dark-mode .about-info,
body.dark-mode .project-card,
body.dark-mode .certificate-card,
body.dark-mode .contact-card,
body.dark-mode .contact-form-card,
body.dark-mode .journey-logo,
body.dark-mode .school-gallery-photo {
    background: #1e293b;
    border-color: #334155;
    color: var(--text-color-second);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}

body.dark-mode .journey-dot {
    background: #1e293b;
    border-color: #8b7cf6;
}

body.dark-mode .journey-date {
    background: #312e81;
    color: #ddd6fe;
}

body.dark-mode .journey-year {
    background: #1e293b;
    border-color: #475569;
    color: #cbd5e1;
}

body.dark-mode .journey-year:hover,
body.dark-mode .journey-year.active {
    background: var(--first-color);
    border-color: var(--first-color);
    color: #ffffff;
}

body.dark-mode .network-item div {
    background: #1e293b;
    border-color: #475569;
    color: #cbd5e1;
}

body.dark-mode .network-dot {
    background: #1e293b;
    border-color: #8b7cf6;
}

body.dark-mode .project-tags span,
body.dark-mode .skills-list span {
    background: #334155;
    color: #e2e8f0;
}

body.dark-mode .project-overlay {
    background: rgba(15, 23, 42, .82);
}

body.dark-mode .input-field,
body.dark-mode .contact-textarea {
    background: #0f172a;
    color: #f8fafc;
    border-color: #475569;
}

body.dark-mode .input-field::placeholder,
body.dark-mode .contact-textarea::placeholder {
    color: #94a3b8;
}

body.dark-mode .certificate-modal {
    background: rgba(2, 6, 23, .88);
}

body.dark-mode .certificate-modal-content {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .certificate-close {
    background: #334155;
    color: #f8fafc;
}

body.dark-mode footer {
    background: #0b1120;
    color: #cbd5e1;
}

@media only screen and (max-width: 900px) {
    body.dark-mode .nav-menu {
        background: rgba(15, 23, 42, .94);
    }
}


/* =====================================================
   SCHOOL PHOTO GALLERY
===================================================== */
.school-gallery {
    position: absolute;
    left: 0;
    top: 50%;
    width: calc(50% - 80px);
    height: 290px;
    transform: translateY(-50%);
    pointer-events: none;
}

.school-gallery-card {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 245px;
    height: 185px;
    padding: 8px;
    background: #ffffff;
    border: 1px solid #e4e8f0;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14);
    overflow: hidden;
    opacity: 0;
    transform: translate(-50%, -50%) scale(.82) rotate(0deg);
    animation: schoolPhotoCycle 15s infinite;
}

.school-gallery-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.school-gallery-card:nth-child(1) { animation-delay: 0s; }
.school-gallery-card:nth-child(2) { animation-delay: 3s; }
.school-gallery-card:nth-child(3) { animation-delay: 6s; }
.school-gallery-card:nth-child(4) { animation-delay: 9s; }
.school-gallery-card:nth-child(5) { animation-delay: 12s; }

@keyframes schoolPhotoCycle {
    0%, 16% {
        opacity: 1;
        z-index: 5;
        transform: translate(-50%, -50%) scale(1) rotate(-2deg);
    }
    20%, 100% {
        opacity: 0;
        z-index: 1;
        transform: translate(-50%, -50%) scale(.78) rotate(8deg);
    }
}








/* Alternating Cards */
.journey-item:nth-child(odd) {
    justify-content: flex-start;
}

.journey-item:nth-child(even) {
    justify-content: flex-end;
}

/* Hover */
.journey-card:hover {
    transform: translateY(-6px);

    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.10);

    border-color: #6c5ce7;
}

/* Date */
.journey-date {
    display: inline-block;

    padding: 8px 16px;

    margin-bottom: 16px;

    background: #eef2ff;
    color: #4f46e5;

    font-size: 14px;
    font-weight: 600;

    border-radius: 20px;
}

/* Title */
.journey-content h3 {
    margin-bottom: 6px;

    font-size: 21px;
    font-weight: 700;

    color: #2d2d2d;
}

/* Subtitle */
.journey-content h4 {
    margin-bottom: 18px;

    font-size: 15px;
    font-weight: 600;

    color: #4f46e5;
}

/* Description */
.journey-content ul {
    margin: 0;
    padding: 0;

    list-style: none;
}

.journey-content li {
    position: relative;

    margin-bottom: 10px;
    padding-left: 22px;

    color: #777;
    font-size: 15px;

    line-height: 1.7;
}

/* Check icon */
.journey-content li::before {
    content: "✓";

    position: absolute;
    left: 0;
    top: 0;

    color: #22c55e;

    font-weight: 700;
}


/* =====================================================
   MY JOURNEY - RESPONSIVE
   ===================================================== */

@media only screen and (max-width: 900px) {

    .journey-timeline {
        max-width: 750px;
    }

    .journey-card {
        width: calc(50% - 35px);
        padding: 24px;
    }

}


@media only screen and (max-width: 768px) {

    .journey-timeline {
        margin-top: 40px;
        padding-left: 25px;
    }

    /* Move timeline to the left */
    .journey-timeline::before {
        left: 10px;
        transform: none;
    }

    .journey-item {
        justify-content: flex-start !important;

        padding-left: 30px;
        margin-bottom: 30px;
    }

    /* Move dots to left */
    .journey-dot {
        left: 10px;
        top: 30px;

        width: 16px;
        height: 16px;

        transform: translateX(-50%);
    }

    /* Full width cards */
    .journey-card {
        width: 100%;
        padding: 22px;
    }

    .journey-content h3 {
        font-size: 19px;
    }

    .journey-content h4 {
        font-size: 14px;
    }

    .journey-content li {
        font-size: 14px;
    }

}


@media only screen and (max-width: 480px) {

    .journey-timeline {
        padding-left: 20px;
    }

    .journey-timeline::before {
        left: 7px;
    }

    .journey-item {
        padding-left: 25px;
    }

    .journey-dot {
        left: 7px;
        width: 14px;
        height: 14px;
        border-width: 3px;
    }

    .journey-card {
        padding: 18px;
        border-radius: 16px;
    }

    .journey-date {
        font-size: 12px;
        padding: 7px 12px;
    }

    .journey-content h3 {
        font-size: 17px;
    }

    .journey-content li {
        font-size: 13px;
        line-height: 1.6;
    }

}




/* =====================================================
   CERTIFICATIONS
   ===================================================== */

.certifications-container {
    width: 100%;
    max-width: 1300px;
    margin: 50px auto 0;

    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

/* Prioritize recognition and high-signal technical credentials first. */
.certifications-container .cert-provider-row:nth-child(1) { order: 3; } /* Cisco Networking Academy */
.certifications-container .cert-provider-row:nth-child(2) { order: 6; } /* Simplilearn | SkillUP */
.certifications-container .cert-provider-row:nth-child(3) { order: 4; } /* Forage Job Simulations */
.certifications-container .cert-provider-row:nth-child(4) { order: 2; } /* IEEE */
.certifications-container .cert-provider-row:nth-child(5) { order: 5; } /* AI & Prompting */
.certifications-container .cert-provider-row:nth-child(6) { order: 1; } /* SUTech Recognition */

/* ================= Provider Row ================= */

.cert-provider-row {
    margin-bottom: 48px;
}

.cert-provider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e8e8e8;
}

body.dark-mode .cert-provider-header {
    border-bottom-color: #334155;
}

.cert-provider-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-color-second);
    margin: 0;
}

.cert-provider-header .view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--first-color);
    font-size: 14px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.cert-provider-header .view-all-link:hover {
    color: var(--first-color-hover);
}

.cert-provider-header .view-all-link i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.cert-provider-header .view-all-link:hover i {
    transform: translateX(4px);
}

.cert-provider-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

/* ================= View All Card ================= */

.view-all-card {
    background: var(--color-white);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #e8e8e8;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);
    transition: all 0.35s ease;
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.view-all-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
    border-color: var(--first-color);
}

.view-all-card-image {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(110, 87, 224, 0.06) 0%, rgba(0, 201, 255, 0.06) 100%);
    transition: background 0.35s ease;
}

.view-all-card:hover .view-all-card-image {
    background: linear-gradient(135deg, rgba(110, 87, 224, 0.12) 0%, rgba(0, 201, 255, 0.12) 100%);
}

.view-all-card-image i {
    font-size: 40px;
    color: var(--first-color);
    opacity: 0.7;
    transition: all 0.35s ease;
}

.view-all-card:hover .view-all-card-image i {
    opacity: 1;
    transform: scale(1.1);
}

.view-all-card-info {
    padding: 16px 14px;
    text-align: center;
}

.view-all-card-info h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--first-color);
}

/* ================= Provider Pages ================= */

.provider-hero {
    text-align: center;
    /* Keep the back link clear of the fixed 90px navigation bar. */
    padding: 8em 10vw 2em;
}

.provider-hero h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-color-second);
    margin-bottom: 10px;
}

.provider-hero p {
    font-size: 15px;
    color: #999;
    max-width: 600px;
    margin: 0 auto;
}

.provider-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--first-color);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 30px;
    transition: color 0.3s ease;
}

.provider-back:hover {
    color: var(--first-color-hover);
}

.provider-back i {
    transition: transform 0.3s ease;
}

.provider-back:hover i {
    transform: translateX(-4px);
}

.provider-certificates-grid {
    width: 80%;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 4em;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}


/* ================= Certificate Card ================= */

.certificate-card {
    background: #ffffff;

    border-radius: 20px;
    overflow: hidden;

    border: 1px solid #e8e8e8;

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);

    transition: all 0.35s ease;
}

.certificate-card:hover {
    transform: translateY(-8px);

    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}


/* ================= Certificate Image ================= */

.certificate-image {
    position: relative;

    width: 100%;
    height: 200px;

    overflow: hidden;

    cursor: pointer;

    background: #f5f5f5;
}

.certificate-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    display: block;

    transition: transform 0.4s ease;
}

.certificate-card:hover .certificate-image img {
    transform: scale(1.05);
}


/* ================= Hover Overlay ================= */

.certificate-overlay {
    position: absolute;

    inset: 0;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 8px;

    background: rgba(40, 40, 40, 0.65);

    color: #ffffff;

    opacity: 0;

    transition: opacity 0.3s ease;
}

.certificate-image:hover .certificate-overlay {
    opacity: 1;
}

.certificate-overlay i {
    font-size: 32px;
}

.certificate-overlay span {
    font-size: 14px;
    font-weight: 600;
}


/* ================= Certificate Info ================= */

.certificate-info {
    padding: 5px;
}

.certificate-info h3 {
    margin: 0 0 8px;

    font-size: 18px;
    font-weight: 700;

    color: #333333;
}


/* ----- Certificate Meta ----- */

.certificate-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.certificate-meta p {
    margin: 0;
    font-size: 14px;
    color: #6c5ce7;
}

.certificate-meta span {
    font-size: 13px;
    color: #888;
    white-space: nowrap;
}


/* =====================================================
   CERTIFICATE MODAL
   ===================================================== */

.certificate-modal {
    position: fixed;

    inset: 0;

    width: 100%;
    height: 100%;

    background: rgba(15, 23, 42, 0.88);

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 30px;

    z-index: 9999;

    opacity: 0;
    visibility: hidden;

    transition: all 0.3s ease;
}

.certificate-modal.active {
    opacity: 1;
    visibility: visible;
}


/* ================= Modal Content ================= */

.certificate-modal-content {
    position: relative;

    width: 90%;
    max-width: 1200px;

    height: 90%;

    background: #ffffff;

    border-radius: 18px;

    overflow: hidden;

    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}


/* ================= PDF Viewer ================= */

.certificate-modal-content iframe {
    width: 100%;
    height: 100%;

    border: none;
}

@media only screen and (max-width: 1150px) and (min-width: 901px) {
    nav {
        padding-inline: 4vw;
        gap: 10px;
    }

    .nav-link {
        padding-inline: 6px;
        font-size: 13px;
    }

    .nav-actions .nav-button {
        display: none;
    }
}

#certificateImage {
    display: none;

    width: 100%;
    height: 100%;

    object-fit: contain;
    background: #ffffff;
}


/* ================= Close Button ================= */

.certificate-close {
    position: absolute;

    top: 12px;
    right: 12px;

    width: 52px;
    height: 52px;

    border: none;

    border-radius: 50%;

    background: rgba(15, 23, 42, 0.75);

    color: #ffffff;

    font-size: 28px;

    cursor: pointer;

    z-index: 10;

    transition: all 0.3s ease;
}

.certificate-close:hover {
    background: rgba(255, 255, 255, 0.25);

    transform: rotate(90deg);
}


/* =====================================================
   RESPONSIVE
   ===================================================== */

@media only screen and (max-width: 900px) {

    .cert-provider-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .provider-certificates-grid {
        grid-template-columns: repeat(2, 1fr);
        width: 90%;
    }

}


@media only screen and (max-width: 600px) {

    .certificate-image {
        height: 130px;
    }

    .certificate-modal {
        padding: 15px;
    }

    .certificate-modal-content {
        width: 100%;
        height: 85%;
    }

    .certificate-close {
        top: 10px;
        right: 10px;
    }

    .cert-provider-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .cert-provider-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .cert-provider-header h2 {
        font-size: 18px;
    }

    .view-all-card-image {
        height: 130px;
    }

    .provider-certificates-grid {
        grid-template-columns: 1fr;
        width: 95%;
        gap: 20px;
    }

}



/* =====================================================
   YEAR NAVIGATION
===================================================== */

.journey-year-navigation {
    position: absolute;

    /* نزّل الدوائر شوية */
    left: 50%;
    top: 125px;

    transform: translateX(-50%);

    display: flex;
    flex-direction: column;

    /* مسافة أكبر بين الدوائر */
    gap: 28px;

    z-index: 30;
}


/* ================= YEAR BUTTON ================= */

.journey-year {
    position: relative;

    width: 30px;
    height: 30px;

    border-radius: 50%;

    /* لون جديد هادي */
    border: 3px solid #18a6b8;

    background: #ffffff;

    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    transition:
        transform 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}


/* الرقم داخل الدائرة */

.journey-year span {
    display: none;
}


/* اسم السنة */

.journey-year small {
    display: block;

    position: absolute;

    left: 42px;

    white-space: nowrap;

    font-size: 12px;
    font-weight: 600;

    color: #555;

    opacity: 0;

    transform: translateX(-5px);

    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}


/* السهم */

.journey-year i {
    position: absolute;

    left: 100px;

    font-size: 18px;
    font-style: normal;

    color: #18a6b8;

    opacity: 0;

    transform: translateX(-6px);

    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}


/* إظهار اسم السنة والسهم عند Hover */

.journey-year:hover small,
.journey-year.active small {
    opacity: 1;
    transform: translateX(0);
}


.journey-year:hover i,
.journey-year.active i {
    opacity: 1;
    transform: translateX(0);
}


/* Hover */

.journey-year:hover {

    transform: scale(1.12);

    background: #18a6b8;

    border-color: #18a6b8;

    box-shadow:
        0 0 0 6px rgba(24, 166, 184, 0.12);
}


/* Active */

.journey-year.active {

    background: #18a6b8;

    border-color: #18a6b8;

    box-shadow:
        0 0 0 7px rgba(24, 166, 184, 0.12);
}


/* =====================================================
   YEAR NETWORK
   ===================================================== */

.journey-network {

    position: absolute;

    /*
       يبدأ بعد خط الـTimeline
       وبعيد شوية عن الدائرة
    */

    left: calc(50% + 80px);

    top: 120px;

    width: 480px;

    min-height: 270px;

    z-index: 20;

    pointer-events: none;

    opacity: 0;

    visibility: hidden;

    transform: translateX(-15px);

    transition:
        opacity 0.35s ease,
        transform 0.35s ease,
        visibility 0.35s ease;
}


/* الشبكة ظاهرة */

.journey-network.active {

    opacity: 1;

    visibility: visible;

    transform: translateX(0);
}


/* ================= MAIN NETWORK LINE ================= */

.network-line {

    position: absolute;

    left: 0;
    top: 15px;

    width: 55px;
    height: 2px;

    background: #18a6b8;

    border-radius: 10px;
}


/* نقطة بداية الشبكة */

.network-line::before {

    content: "";

    position: absolute;

    left: -5px;
    top: -4px;

    width: 10px;
    height: 10px;

    border-radius: 50%;

    background: #18a6b8;

    box-shadow:
        0 0 0 5px rgba(24, 166, 184, 0.10);
}


/* =====================================================
   NETWORK ITEMS
   ===================================================== */

.network-items {

    position: absolute;

    /*
       بعد الخط الرئيسي
       عشان الفروع متبقاش لازقة في الدائرة
    */

    left: 90px;

    top: 0;

    display: flex;

    flex-direction: column;

    /*
       مسافة منظمة بين العناصر
    */

    gap: 20px;
}


/* كل فرع */

.network-item {

    position: relative;

    display: flex;

    align-items: center;

    min-height: 34px;
}


/* خط الفرع */

.network-item::before {

    content: "";

    position: absolute;

    right: 100%;

    top: 50%;

    width: 55px;

    height: 2px;

    background: #18a6b8;

    transform: translateY(-50%);

    opacity: 0.65;
}


/* نقطة الفرع */

.network-dot {

    flex-shrink: 0;

    width: 9px;
    height: 9px;

    border-radius: 50%;

    background: #18a6b8;

    margin-right: 12px;

    box-shadow:
        0 0 0 5px rgba(24, 166, 184, 0.08);
}


/* بطاقة الإنجاز */

.network-item div {

    min-width: 190px;

    background: #ffffff;

    border: 1px solid rgba(24, 166, 184, 0.18);

    border-radius: 12px;

    padding: 10px 16px;

    font-size: 13px;

    font-weight: 600;

    color: #444;

    white-space: nowrap;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.06);

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}


/* Hover على Achievement */

.network-item div:hover {

    transform: translateX(5px);

    border-color: rgba(24, 166, 184, 0.45);

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.09);
}


/* =====================================================
   MOBILE
   ===================================================== */

@media (max-width: 900px) {

    .journey-year-navigation {

        left: 50%;

        top: 110px;

        gap: 24px;
    }


    .journey-network {

        left: calc(50% + 55px);

        width: 320px;

        top: 105px;
    }


    .network-items {

        left: 65px;
    }


    .network-item div {

        min-width: 150px;

        font-size: 12px;

        padding: 8px 12px;
    }

    .school-gallery {
        left: 4%;
        top: auto;
        bottom: 20px;
        width: 42%;
        height: 210px;
    }

    .school-gallery-card {
        width: 190px;
        height: 145px;
    }

}

@media (max-width: 768px) {
    .school-gallery {
        position: relative;
        left: auto;
        top: auto;
        bottom: auto;
        width: 100%;
        height: 220px;
        margin: 0 auto 25px;
        transform: none;
        order: 1;
    }

    .school-journey-item {
        display: flex;
        flex-direction: column;
    }

    .school-journey-item .journey-card {
        order: 2;
        width: 100%;
    }
}

/* =====================================================
   SCHOOL PHOTO CIRCLE GALLERY
===================================================== */
.school-gallery {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 350px;
    pointer-events: auto;
}

.school-gallery-stage {
    position: relative;
    width: 280px;
    height: 280px;
    display: grid;
    place-items: center;
}

/* Red circle placed on the main timeline between school and nursing. */
.journey-middle-marker {
    position: relative;
    height: 0;
    z-index: 8;
}

.journey-middle-marker::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -18px;
    width: 38px;
    height: 38px;
    border: 5px solid #ef2028;
    border-radius: 50%;
    background: #ffffff;
    transform: translateX(-50%);
    box-shadow: 0 0 0 6px rgba(239, 32, 40, .08);
}

.school-gallery-arrow {
    position: relative;
    z-index: 6;
    width: 38px;
    height: 38px;
    border: 2px solid #ef2028;
    border-radius: 50%;
    background: #ffffff;
    color: #ef2028;
    font-size: 30px;
    line-height: 25px;
    cursor: pointer;
    transition: transform .25s ease, background .25s ease, color .25s ease;
}

.school-gallery-arrow:hover {
    background: #ef2028;
    color: #ffffff;
    transform: scale(1.12);
}

.gallery-image-changing {
    animation: galleryImageChange .45s ease;
}

@keyframes galleryImageChange {
    from { opacity: .25; transform: scale(.9) rotate(-4deg); }
    to { opacity: 1; transform: scale(1) rotate(0); }
}

.school-gallery-counter {
    position: absolute;
    left: 50%;
    bottom: 8px;
    z-index: 7;
    transform: translateX(-50%);
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .9);
    color: #ef2028;
    font-size: 11px;
    font-weight: 700;
}

/* Final photo-stack look: real photos only, without decorative frames or circles. */
.school-gallery-stage {
    width: 430px;
    height: 330px;
}

.school-gallery-stack {
    position: relative;
    width: 100%;
    height: 100%;
    background: transparent;
}

.school-gallery-photo {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 330px;
    height: 235px;
    padding: 0;
    object-fit: contain;
    background: transparent;
    border: 0;
    border-radius: 3px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .16);
    opacity: .62;
    z-index: 1;
    transform: translate(-50%, -50%) scale(.92) rotate(0deg);
    transition: transform .55s ease, opacity .55s ease, z-index .55s ease;
    image-rendering: auto;
}

.school-gallery-photo.no-upscale {
    object-fit: contain;
}

/* Portrait photos get white side space instead of transparent sides. */
.school-gallery-photo.portrait-photo {
    background: #ffffff;
}

/* With a portrait photo, hide the stack completely so no other photo shows behind it. */
.school-gallery.portrait-mode .school-gallery-stack {
    background: #ffffff;
}

.school-gallery.portrait-mode .school-gallery-photo:not(.is-active) {
    opacity: 0 !important;
    visibility: hidden;
}

.school-gallery.portrait-mode .school-gallery-photo.is-active {
    background: #ffffff;
}

.nursing-journey-item {
    justify-content: flex-start !important;
}

.nursing-journey-item .school-gallery {
    left: auto;
    right: 0;
}

.school-gallery-photo:nth-child(1) { transform: translate(-50%, -50%) rotate(-10deg) scale(.88); }
.school-gallery-photo:nth-child(2) { transform: translate(-50%, -50%) rotate(7deg) scale(.91); }
.school-gallery-photo:nth-child(3) { transform: translate(-50%, -50%) rotate(-4deg) scale(.94); }
.school-gallery-photo:nth-child(4) { transform: translate(-50%, -50%) rotate(9deg) scale(.9); }
.school-gallery-photo:nth-child(5) { transform: translate(-50%, -50%) rotate(-7deg) scale(.92); }

.school-gallery-photo.is-active {
    z-index: 5;
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg) scale(1.04);
}

.school-gallery-photo.gallery-spin {
    animation: galleryPhoto360 .9s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes galleryPhoto360 {
    0% {
        opacity: .25;
        transform: translate(-50%, -50%) rotate(0deg) scale(.72);
    }
    70% {
        opacity: 1;
        transform: translate(-50%, -50%) rotate(360deg) scale(1.08);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) rotate(360deg) scale(1.04);
    }
}

/* The timeline marker remains hidden on the current Journey layout. */
.journey-middle-marker {
    display: none !important;
}

@media (max-width: 768px) {
    .school-gallery {
        height: 300px;
        margin-bottom: 20px;
    }

    .school-gallery-stage {
        width: 330px;
        height: 260px;
    }

    .school-gallery-photo {
        width: 245px;
        height: 175px;
    }
}

/* Hide journey image galleries and year decorations on small screens. */
@media (max-width: 768px) {
    .school-gallery,
    .journey-middle-marker,
    .journey-year-navigation,
    .journey-network {
        display: none !important;
    }
}

/* Keep the mobile timeline clear: the year network is desktop navigation. */
@media (max-width: 768px) {
    .journey-year-navigation,
    .journey-network,
    .school-gallery,
    .journey-middle-marker {
        display: none;
    }
}

/* Final gallery layout: fixed 4:3 frame matching 12.jpg, with the photo stack visible. */
.school-gallery-stack {
    background: var(--body-color);
    overflow: visible;
}

.school-gallery-photo {
    width: 320px;
    height: 240px;
    object-fit: cover;
    background: #ffffff;
    border: 0;
    border-radius: 0;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
    opacity: .55;
    visibility: visible;
    transform: translate(-50%, -50%) scale(.92) rotate(0deg);
}

.school-gallery-photo:not(.is-active) {
    opacity: .55 !important;
    visibility: visible !important;
    pointer-events: none;
}

.school-gallery-photo.is-active {
    opacity: 1;
    visibility: visible;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
    transform: translate(-50%, -50%) scale(1.04) rotate(0deg);
}

.school-gallery-photo.portrait-photo,
.school-gallery.portrait-mode .school-gallery-stack,
.school-gallery.portrait-mode .school-gallery-photo.is-active {
    background: #ffffff;
}

@media (max-width: 768px) {
    .school-gallery-photo {
        width: 280px;
        height: 210px;
    }
}

/* =====================================================
   APPROVED DARK MODE — COOL GRAY PROFESSIONAL
   Light Mode rules remain unchanged above.
===================================================== */
body.dark-mode {
    background: var(--theme-bg);
    color: var(--theme-text-main);
}

body.dark-mode nav {
    background: var(--theme-surface);
    border-bottom: 1px solid var(--theme-border);
}

body.dark-mode .nav-link { color: var(--theme-text-secondary); }
body.dark-mode .nav-link:hover,
body.dark-mode .nav-link.active-link { color: var(--theme-primary); }
body.dark-mode .nav-link::after { background: var(--theme-primary); }
body.dark-mode .nav-menu-btn { color: var(--theme-text-secondary); }
body.dark-mode .nav-logo span { color: var(--theme-text-muted); }

body.dark-mode .theme-toggle {
    background: var(--theme-card);
    border-color: var(--theme-border);
    color: var(--theme-text-main);
}

body.dark-mode .theme-toggle:hover {
    background: var(--theme-button);
    border-color: var(--theme-button-hover);
    color: #ffffff;
    box-shadow: 0 0 0 3px var(--theme-glow);
}

body.dark-mode .featured-name,
body.dark-mode .top-header h1,
body.dark-mode .about-info h3,
body.dark-mode .journey-content h3,
body.dark-mode .project-info h3,
body.dark-mode .certificate-info h3,
body.dark-mode .contact-card h2,
body.dark-mode .form-title h2 { color: var(--theme-text-main); }

body.dark-mode .featured-text-info p,
body.dark-mode .about-info p,
body.dark-mode .journey-content li,
body.dark-mode .project-info p,
body.dark-mode .contact-role,
body.dark-mode .certificate-meta p { color: var(--theme-text-secondary); }

body.dark-mode .top-header span,
body.dark-mode .certificate-meta span,
body.dark-mode .form-note { color: var(--theme-text-muted); }

body.dark-mode .typedText,
body.dark-mode .featured-text-card,
body.dark-mode .form-title span { color: var(--theme-primary); }

body.dark-mode .skills-box,
body.dark-mode .project-card,
body.dark-mode .certificate-card,
body.dark-mode .journey-card,
body.dark-mode .contact-card,
body.dark-mode .contact-form-card {
    background: var(--theme-card);
    border-color: var(--theme-border);
    color: var(--theme-text-secondary);
    box-shadow: 0 10px 28px rgba(15, 18, 24, .32);
}

body.dark-mode .skills-box:hover,
body.dark-mode .about-info:hover,
body.dark-mode .project-card:hover,
body.dark-mode .certificate-card:hover,
body.dark-mode .journey-card:hover,
body.dark-mode .contact-card:hover,
body.dark-mode .contact-form-card:hover {
    background: var(--theme-card-elevated);
    border-color: var(--theme-primary);
    box-shadow: 0 12px 30px var(--theme-glow);
}

body.dark-mode .skills-list span,
body.dark-mode .project-tags span {
    background: var(--theme-tag-bg);
    color: var(--theme-tag-text);
}

body.dark-mode .journey-date {
    background: var(--theme-year);
    color: var(--theme-text-main);
}

body.dark-mode .journey-timeline::before { background: var(--theme-timeline); }
body.dark-mode .journey-dot {
    background: var(--theme-card);
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 5px rgba(139, 124, 246, .14);
}

body.dark-mode .journey-logo {
    background: #ffffff;
    border-color: var(--theme-border);
    box-shadow: 0 4px 15px rgba(15, 18, 24, .35);
}

body.dark-mode .journey-year {
    background: var(--theme-year);
    border-color: var(--theme-border);
    color: var(--theme-text-secondary);
}

body.dark-mode .journey-year:hover,
body.dark-mode .journey-year.active {
    background: var(--theme-primary);
    border-color: var(--theme-primary);
    color: #ffffff;
    box-shadow: 0 0 0 4px rgba(139, 124, 246, .14);
}

body.dark-mode .network-line { background: var(--theme-network); }
body.dark-mode .network-dot {
    background: var(--theme-card);
    border-color: var(--theme-network-node);
    box-shadow: 0 0 0 5px rgba(53, 198, 208, .12);
}

body.dark-mode .network-item div {
    background: var(--theme-card);
    border-color: var(--theme-border);
    color: var(--theme-text-secondary);
}

body.dark-mode .network-item div:hover {
    border-color: var(--theme-secondary);
    color: var(--theme-text-main);
    box-shadow: 0 0 0 3px var(--theme-glow);
}

body.dark-mode .project-overlay,
body.dark-mode .certificate-overlay { background: rgba(32, 36, 43, .86); }

body.dark-mode .project-info h3 { color: var(--theme-text-main); }
body.dark-mode .project-info p { color: var(--theme-text-secondary); }

body.dark-mode .btn {
    background: var(--theme-button);
    color: #ffffff;
}

body.dark-mode .btn:hover {
    background: var(--theme-button-hover);
    color: #ffffff;
    box-shadow: 0 0 0 3px var(--theme-glow);
}

body.dark-mode .project-drive-btn,
body.dark-mode .send-message-btn,
body.dark-mode .primary-btn {
    background: var(--theme-button);
    color: #ffffff;
}

body.dark-mode .scroll-btn {
    color: var(--theme-text-secondary);
}

body.dark-mode ::-webkit-scrollbar-track { background: var(--theme-surface); }
body.dark-mode ::-webkit-scrollbar-thumb { background: var(--theme-border); }
body.dark-mode ::-webkit-scrollbar-thumb:hover { background: var(--theme-primary); }

body.dark-mode .project-drive-btn:hover,
body.dark-mode .send-message-btn:hover,
body.dark-mode .primary-btn:hover {
    background: var(--theme-button-hover);
    box-shadow: 0 0 0 3px var(--theme-glow);
}

body.dark-mode .secondary-btn,
body.dark-mode .about-btn .btn:not(.blue-btn),
body.dark-mode .featured-text-btn .btn:not(.blue-btn) {
    background: var(--theme-surface);
    border-color: var(--theme-border);
    color: var(--theme-text-main);
}

body.dark-mode .secondary-btn:hover,
body.dark-mode .about-btn .btn:not(.blue-btn):hover,
body.dark-mode .featured-text-btn .btn:not(.blue-btn):hover {
    background: var(--theme-card-elevated);
    border-color: var(--theme-primary);
    color: var(--theme-text-main);
}

body.dark-mode .social-link {
    background: var(--theme-surface);
    border-color: var(--theme-border);
    color: var(--theme-text-secondary);
    box-shadow: 0 5px 15px rgba(15, 18, 24, .25);
}

body.dark-mode .social-link:hover {
    background: var(--theme-card-elevated);
    border-color: var(--theme-primary);
    color: var(--theme-primary);
    box-shadow: 0 0 0 3px var(--theme-glow);
}

body.dark-mode .contact-form-card .input-field,
body.dark-mode .contact-textarea {
    background: var(--theme-input);
    border-color: var(--theme-input-border);
    color: var(--theme-text-main);
}

body.dark-mode .contact-form-card .input-field::placeholder,
body.dark-mode .contact-textarea::placeholder { color: var(--theme-text-muted); }

body.dark-mode .contact-form-card .input-field:focus,
body.dark-mode .contact-textarea:focus {
    background: var(--theme-input);
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 3px rgba(139, 124, 246, .16);
}

body.dark-mode .school-gallery-stack { background: var(--theme-bg); }
body.dark-mode .school-gallery-photo {
    background: var(--theme-card);
    border-color: var(--theme-border);
    box-shadow: 0 10px 24px rgba(15, 18, 24, .35);
}

/* Remove the visible background/frame behind Journey gallery photos in Dark Mode. */
body.dark-mode .school-gallery-stack,
body.dark-mode .school-gallery.portrait-mode .school-gallery-stack,
body.dark-mode .school-gallery-photo,
body.dark-mode .school-gallery-photo.portrait-photo,
body.dark-mode .school-gallery.portrait-mode .school-gallery-photo.is-active {
    background: transparent;
}

body.dark-mode .school-gallery-arrow {
    background: var(--theme-card);
    border-color: var(--theme-secondary);
    color: var(--theme-secondary);
}

body.dark-mode .school-gallery-arrow:hover {
    background: var(--theme-secondary);
    color: #20242B;
    box-shadow: 0 0 0 3px var(--theme-glow);
}

body.dark-mode .certificate-modal { background: var(--theme-modal); }
body.dark-mode .certificate-modal-content {
    background: var(--theme-card);
    border-color: var(--theme-border);
}

body.dark-mode .certificate-close {
    background: var(--theme-button);
    color: #ffffff;
}

body.dark-mode .certificate-close:hover { background: var(--theme-button-hover); }

/* Provider Row Dark Mode */
body.dark-mode .cert-provider-header {
    border-bottom-color: var(--theme-border);
}

body.dark-mode .cert-provider-header h2 {
    color: var(--theme-text-main);
}

body.dark-mode .cert-provider-header .view-all-link {
    color: var(--theme-primary);
}

body.dark-mode .cert-provider-header .view-all-link:hover {
    color: var(--theme-hover);
}

body.dark-mode .view-all-card {
    background: var(--theme-card);
    border-color: var(--theme-border);
    color: var(--theme-text-secondary);
    box-shadow: 0 10px 28px rgba(15, 18, 24, .32);
}

body.dark-mode .view-all-card:hover {
    background: var(--theme-card-elevated);
    border-color: var(--theme-primary);
    box-shadow: 0 12px 30px var(--theme-glow);
}

body.dark-mode .view-all-card-image {
    background: linear-gradient(135deg, rgba(139, 124, 246, 0.08) 0%, rgba(53, 198, 208, 0.08) 100%);
}

body.dark-mode .view-all-card:hover .view-all-card-image {
    background: linear-gradient(135deg, rgba(139, 124, 246, 0.15) 0%, rgba(53, 198, 208, 0.15) 100%);
}

body.dark-mode .view-all-card-image i {
    color: var(--theme-primary);
}

body.dark-mode .provider-hero h1 {
    color: var(--theme-text-main);
}

body.dark-mode .provider-hero p {
    color: var(--theme-text-muted);
}

body.dark-mode .provider-back {
    color: var(--theme-primary);
}

body.dark-mode .provider-back:hover {
    color: var(--theme-hover);
}

body.dark-mode footer { background: var(--theme-footer); color: var(--theme-text-secondary); }
body.dark-mode .footer_menu_list a,
body.dark-mode .bottom-footer,
body.dark-mode .top-footer p { color: var(--theme-text-secondary); }
body.dark-mode .footer_menu_list a:hover { color: var(--theme-primary); }

@media only screen and (max-width: 900px) {
    body.dark-mode .nav-menu {
        background: var(--theme-surface);
        border-color: var(--theme-border);
    }
}

/* =====================================================
   FINAL DARK MODE REFINEMENTS
===================================================== */
body.dark-mode nav,
body.dark-mode .nav-actions,
body.dark-mode .nav-button {
    background: transparent;
}

body.dark-mode nav {
    background: var(--theme-surface);
}

body.dark-mode .nav-menu,
body.dark-mode .nav_menu_list {
    background: transparent;
}

body.dark-mode .nav-button .btn {
    background: var(--theme-button);
    color: #ffffff;
}

body.dark-mode .nav-button .btn:hover {
    background: var(--theme-button-hover);
    color: #ffffff;
}

body.dark-mode .icon,
body.dark-mode .icon i,
body.dark-mode .social-link i,
body.dark-mode .footer-social-icons i {
    color: var(--theme-text-secondary);
    transition: color .3s ease;
}

body.dark-mode .icon:hover,
body.dark-mode .icon:hover i,
body.dark-mode .social-link:hover i,
body.dark-mode .footer-social-icons a:hover i {
    color: var(--theme-primary);
}

body.dark-mode .icon:focus-visible,
body.dark-mode .social-link:focus-visible,
body.dark-mode .footer-social-icons a:focus-visible {
    outline: 2px solid var(--theme-hover);
    outline-offset: 3px;
}

body.dark-mode #about .row > .col:last-child .skills-box {
    background: transparent;
    border: 0;
    box-shadow: none;
    color: var(--theme-text-secondary);
    transition: background .3s ease, border-color .3s ease;
}

body.dark-mode #about .row > .col:last-child .skills-box:hover {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

body.dark-mode #about .row > .col:last-child .skills-header h3 {
    color: var(--theme-text-main);
}

body.dark-mode #about .row > .col:last-child .skills-list span {
    background: rgba(139, 124, 246, 0.08);
    border: 1px solid rgba(139, 124, 246, 0.12);
    color: var(--theme-tag-text);
    transition: background .3s ease, border-color .3s ease, color .3s ease;
}

body.dark-mode #about .row > .col:last-child .skills-list span:hover {
    background: rgba(139, 124, 246, 0.16);
    border-color: rgba(139, 124, 246, 0.28);
    color: var(--theme-text-main);
}

/* Footer owner name */
.bottom-footer a {
    color: var(--text-color-third);
    font-weight: 600;
    text-decoration: none;
    transition: color .3s ease;
}

.bottom-footer a:hover {
    color: var(--first-color);
}

body.dark-mode .bottom-footer a {
    color: var(--theme-secondary);
}

body.dark-mode .bottom-footer a:hover {
    color: var(--theme-hover);
}

/* CONTACT-STYLE DECORATION FOR ABOUT AND EDUCATION CARDS */
body.dark-mode .about-info,
body.dark-mode .journey-card {
    background-color: var(--theme-card);
    background-image:
        radial-gradient(circle at 100% 0%, rgba(255, 255, 255, .075) 0 112px, transparent 113px),
        radial-gradient(circle at 0% 100%, rgba(255, 255, 255, .045) 0 82px, transparent 83px);
    background-repeat: no-repeat;
    overflow: hidden;
}

body.dark-mode .about-info:hover,
body.dark-mode .journey-card:hover {
    background-color: var(--theme-card-elevated);
    background-image:
        radial-gradient(circle at 100% 0%, rgba(255, 255, 255, .085) 0 112px, transparent 113px),
        radial-gradient(circle at 0% 100%, rgba(255, 255, 255, .05) 0 82px, transparent 83px);
}

/* The inner About button gets its own dark-mode accent color. */
body.dark-mode .about-btn .btn:not(.blue-btn) {
    background: var(--theme-button);
    border-color: var(--theme-button);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(139, 124, 246, .18);
}

body.dark-mode .about-btn .btn:not(.blue-btn):hover {
    background: var(--theme-button-hover);
    border-color: var(--theme-button-hover);
    color: #ffffff;
    box-shadow: 0 0 0 3px var(--theme-glow);
}

/* Keep Scroll Down clear of the social icons on small screens. */
@media only screen and (max-width: 900px) {
    .featured-text {
        padding-bottom: 70px;
    }

    .social_icons {
        position: relative;
        z-index: 2;
        margin-bottom: 70px;
    }

    .scroll-btn {
        display: none;
    }
}

/* Show contact social links two per row on mobile. */
@media only screen and (max-width: 540px) {
    .social-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
}


/* =====================================================
   MOBILE RESPONSIVE IMPROVEMENTS
   ===================================================== */

/* ── HOME SECTION ── */
@media only screen and (max-width: 900px) {

    /* wrapper padding أقل على الموبايل */
    .wrapper {
        padding-inline: 5vw;
    }

    /* الصفحة الرئيسية تاخد space كافي */
    .featured-box {
        min-height: 100svh;
        padding-top: 90px;
        padding-bottom: 30px;
        gap: 0;
        align-items: center;
    }

    /* الصورة أكبر على الموبايل */
    .featured-image {
        min-height: 200px;
        margin-top: 80px;
    }

    .image,
    .image img {
        width: 200px;
        height: 200px;
    }

    /* النص متمركز */
    .featured-text {
        text-align: center;
        align-items: center;
        padding-inline: 10px;
        min-height: auto;
    }

    .featured-name {
        font-size: 36px;
        margin-block: 14px;
    }

    .featured-text-info {
        font-size: 14px;
        max-width: 480px;
    }

    /* الأزرار في السطر نفسه ومتمركزين */
    .featured-text-btn {
        justify-content: center;
        flex-wrap: wrap;
        gap: 12px;
    }

    /* الأيقونات الاجتماعية متمركزة */
    .social_icons {
        justify-content: center;
        margin-top: 1.5em;
        gap: 20px;
        margin-bottom: 20px;
    }

}

/* ── HOME - شاشات صغيرة جداً ── */
@media only screen and (max-width: 480px) {

    .featured-name {
        font-size: 30px;
    }

    .image,
    .image img {
        width: 170px;
        height: 170px;
    }

    .featured-image {
        margin-top: 70px;
    }

    .btn {
        padding: 10px 16px;
        font-size: 14px;
    }

}

/* =====================================================
   RESPONSIVE POLISH - SMALL PHONES & TABLETS
   ===================================================== */

/* Prevent decorative elements and long card content from creating
   horizontal scrolling on narrow screens. */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

img,
video,
iframe {
    max-width: 100%;
}

@media only screen and (max-width: 1200px) and (min-width: 901px) {
    nav {
        padding-inline: 5vw;
    }

    .wrapper {
        padding-inline: 7vw;
    }

    .featured-name {
        font-size: clamp(38px, 4.3vw, 50px);
    }

    .project-container,
    .provider-certificates-grid {
        gap: 22px;
    }
}

@media only screen and (max-width: 900px) {
    nav {
        height: 74px;
        line-height: 74px;
        padding-inline: 16px;
        gap: 8px;
    }

    .nav-logo {
        min-width: 0;
    }

    .nav-name {
        font-size: clamp(19px, 5vw, 25px);
        white-space: nowrap;
    }

    .nav-logo span {
        top: -13px;
        right: -12px;
        font-size: 3em;
    }

    .nav-actions {
        margin-left: auto;
        gap: 6px;
    }

    .theme-toggle {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .nav-menu-btn {
        width: 42px;
        height: 42px;
        padding: 0;
        flex: 0 0 42px;
        border-radius: 12px;
    }

    .nav-menu-btn:focus-visible,
    .theme-toggle:focus-visible,
    .btn:focus-visible,
    .contact-btn:focus-visible,
    .send-message-btn:focus-visible {
        outline: 3px solid rgba(110, 87, 224, .35);
        outline-offset: 3px;
    }

    .nav-menu {
        top: 74px;
        width: min(100%, 420px);
        min-height: auto;
        height: calc(100dvh - 74px);
        padding: 28px 20px;
        justify-content: flex-start;
        border-top: 1px solid rgba(110, 87, 224, .12);
        box-shadow: 0 18px 35px rgba(31, 41, 55, .12);
    }

    .nav_menu_list {
        width: 100%;
        gap: 8px;
    }

    .nav-menu .nav_list,
    .nav-link {
        width: 100%;
    }

    .nav-link {
        display: block;
        padding: 13px 16px;
        margin-inline: 0;
        border-radius: 12px;
        font-size: 16px;
        line-height: 1.4;
    }

    .nav-link:hover,
    .nav-link.active-link {
        background: rgba(110, 87, 224, .09);
    }

    .nav-link::after {
        display: none;
    }

    .wrapper {
        padding-inline: 18px;
    }

    .featured-box {
        height: auto;
        min-height: 100svh;
        padding-top: 105px;
        padding-bottom: 42px;
        gap: 18px;
    }

    .featured-image {
        min-height: 0;
        margin-top: 0;
    }

    .image,
    .image img {
        width: clamp(156px, 40vw, 205px);
        height: clamp(156px, 40vw, 205px);
    }

    .featured-text {
        padding: 0;
    }

    .featured-name {
        font-size: clamp(30px, 7.8vw, 42px);
        line-height: 1.2;
        margin-block: 12px 16px;
    }

    .featured-text-info {
        max-width: 560px;
        margin-bottom: 22px;
        line-height: 1.7;
    }

    .featured-text-btn {
        width: 100%;
        max-width: 430px;
    }

    .featured-text-btn .btn {
        flex: 1 1 170px;
        text-align: center;
    }

    .social_icons {
        margin-top: 24px;
        margin-bottom: 0;
    }

    .section {
        padding-block: 4.5em;
    }

    .top-header {
        margin-bottom: 2.8em;
    }

    .top-header h1 {
        font-size: clamp(26px, 5vw, 34px);
    }

    .top-header span {
        display: block;
        line-height: 1.7;
    }

    .project-container,
    .provider-certificates-grid {
        width: 100%;
    }

    .project-card,
    .certificate-card {
        border-radius: 16px;
    }

    .project-info,
    .certificate-info {
        padding: 14px;
    }

    .project-info h3,
    .certificate-info h3 {
        font-size: 16px;
        line-height: 1.45;
    }

    .project-info p {
        font-size: 13px;
    }

    .certificate-info h3 {
        font-size: 15px;
    }

    .journey-timeline {
        margin-top: 28px;
    }

    .journey-content h3 {
        line-height: 1.4;
    }

    .contact-wrapper {
        gap: 22px;
    }

    .contact-card,
    .contact-form-card {
        border-radius: 18px;
    }
}

@media only screen and (max-width: 480px) {
    .wrapper {
        padding-inline: 14px;
    }

    nav {
        padding-inline: 12px;
    }

    .nav-name {
        font-size: 18px;
    }

    .nav-logo span {
        right: -9px;
        font-size: 2.7em;
    }

    .nav-menu {
        padding-inline: 14px;
    }

    .featured-box {
        padding-top: 94px;
        padding-bottom: 28px;
        gap: 12px;
    }

    .featured-text-card span {
        font-size: 11px;
    }

    .featured-name {
        font-size: clamp(27px, 8.5vw, 34px);
    }

    .featured-text-info {
        font-size: 13px;
        line-height: 1.65;
    }

    .featured-text-btn {
        gap: 10px;
    }

    .featured-text-btn .btn {
        flex-basis: 100%;
    }

    .social_icons {
        gap: 14px;
    }

    .icon {
        width: 38px;
        height: 38px;
    }

    /* One comfortable column is easier to scan than two cramped cards. */
    .project-container,
    .provider-certificates-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .project-image,
    .certificate-image {
        height: 190px;
    }

    .certificate-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .journey-timeline {
        padding-left: 18px;
    }

    .journey-item {
        padding-left: 22px;
        margin-bottom: 22px;
    }

    .journey-card {
        padding: 16px;
        border-radius: 14px;
    }

    .journey-date {
        max-width: 100%;
        font-size: 11px;
        padding: 6px 10px;
    }

    .journey-content h3 {
        font-size: 16px;
    }

    .journey-content h4 {
        margin-bottom: 12px;
        font-size: 13px;
    }

    .journey-content li {
        padding-left: 19px;
        font-size: 13px;
        line-height: 1.55;
    }

    .contact-card,
    .contact-form-card {
        padding: 24px 16px;
    }

    .contact-buttons {
        flex-direction: column;
    }

    .contact-btn,
    .send-message-btn {
        width: 100%;
        min-height: 48px;
    }

    .social-links {
        gap: 8px;
    }

    .social-link {
        min-height: 48px;
        padding-inline: 10px;
    }

    footer {
        row-gap: 20px;
        padding: 32px 14px 42px;
        text-align: center;
    }

    .middle-footer .footer-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 14px;
    }

    .footer_menu_list a {
        margin-inline: 4px;
        font-size: 13px;
    }
}

@media only screen and (max-width: 360px) {
    nav {
        padding-inline: 10px;
    }

    .nav-name {
        font-size: 16px;
    }

    .theme-toggle,
    .nav-menu-btn {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

    .theme-toggle {
        font-size: 16px;
    }

    .nav-menu-btn i {
        font-size: 21px;
    }

    .featured-box {
        padding-top: 88px;
    }

    .image,
    .image img {
        width: 148px;
        height: 148px;
    }

    .featured-name {
        font-size: 26px;
    }

    .top-header h1 {
        font-size: 25px;
    }

    .contact-avatar img {
        width: 96px;
        height: 96px;
    }
}


/* ── ABOUT SECTION ── */
@media only screen and (max-width: 900px) {

    .section {
        padding-block: 4em;
    }

    .top-header {
        margin-bottom: 3em;
    }

    .about-info {
        padding-block: 28px 28px;
        padding-inline: 20px;
    }

    .about-info p {
        font-size: 14px;
        text-align: left;
    }

    .about-btn {
        margin-top: 20px;
        display: flex;
        justify-content: center;
    }

    /* Skills: 2 columns بدل 3 */
    #about .row > .col:last-child {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px 12px;
    }

}

@media only screen and (max-width: 480px) {

    /* Skills: عمود واحد على الشاشات الصغيرة */
    #about .row > .col:last-child {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .skills-header h3 {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .skills-list span {
        font-size: 12px;
    }

}


/* ── PROJECTS & CERTIFICATES ── */
@media only screen and (max-width: 480px) {

    /* Projects: عمود واحد على الموبايل الصغير */
    .project-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .project-image {
        height: 180px;
    }

    .project-info {
        padding: 14px;
    }

    .project-info h3 {
        font-size: 15px;
    }

    .project-info p {
        font-size: 13px;
    }

    /* Certifications: عمود واحد */
    .certificate-image {
        height: 180px;
    }

    .certificate-info {
        padding: 12px;
    }

    .certificate-info h3 {
        font-size: 15px;
    }

    .certificate-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .cert-provider-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .cert-provider-row {
        margin-bottom: 36px;
    }

}

@media only screen and (max-width: 600px) and (min-width: 481px) {

    /* على الموبايل المتوسط: 2 columns بس أكبر */
    .project-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .cert-provider-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .project-image,
    .certificate-image {
        height: 150px;
    }

}


/* ── JOURNEY SECTION ── */
@media only screen and (max-width: 768px) {

    .journey-timeline {
        padding-left: 30px;
        margin-top: 30px;
    }

    .journey-card {
        padding: 20px 18px;
    }

    /* الـ logo أصغر شوية */
    .journey-logo {
        width: 60px;
        height: 60px;
        top: 14px;
        right: 14px;
    }

    .journey-content h3 {
        font-size: 17px;
        padding-right: 68px; /* مسافة للـ logo */
    }

    .journey-content h4 {
        font-size: 13px;
    }

    .journey-date {
        font-size: 12px;
        padding: 6px 12px;
    }

}

@media only screen and (max-width: 480px) {

    .journey-timeline {
        padding-left: 22px;
    }

    .journey-card {
        padding: 16px 14px;
        border-radius: 14px;
    }

    .journey-logo {
        width: 50px;
        height: 50px;
        top: 12px;
        right: 12px;
    }

    .journey-content h3 {
        font-size: 15px;
        padding-right: 60px;
    }

    .journey-content li {
        font-size: 13px;
        line-height: 1.6;
        margin-bottom: 8px;
    }

}


/* ── CONTACT SECTION ── */
@media only screen and (max-width: 900px) {

    .contact-wrapper {
        gap: 25px;
        width: 100%;
    }

    .contact-header h1 {
        font-size: 28px;
    }

    .contact-card {
        padding: 30px 24px;
    }

    .contact-card h2 {
        font-size: 22px;
    }

    /* Social links: 2 columns */
    .social-links {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .social-link {
        padding: 11px 12px;
        font-size: 12px;
    }

}

@media only screen and (max-width: 480px) {

    .contact-section {
        padding-bottom: 4em;
    }

    .contact-card {
        padding: 25px 18px;
    }

    .contact-avatar {
        width: 80px;
        height: 80px;
    }

    .contact-card h2 {
        font-size: 20px;
    }

    .contact-role {
        font-size: 12px;
    }

    .contact-email {
        font-size: 13px;
        flex-direction: column;
        gap: 6px;
    }

    .contact-buttons {
        gap: 8px;
    }

    .contact-btn {
        padding: 10px 14px;
        font-size: 12px;
    }

    /* Social links: عمود واحد على الموبايل الصغير */
    .social-links {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .social-link {
        padding: 12px 15px;
    }

    /* Contact form */
    .contact-form-card {
        padding: 22px 16px;
    }

    .form-title h2 {
        font-size: 20px;
    }

    .contact-form-card .form-inputs {
        flex-direction: column;
    }

    .contact-form-card .input-field {
        width: 100%;
        height: 50px;
    }

    .contact-textarea {
        height: 160px;
    }

    .send-message-btn {
        padding: 13px 18px;
    }

}


/* ── NAVIGATION - موبايل ── */
@media only screen and (max-width: 900px) {

    nav {
        padding-inline: 5vw;
        height: 70px;
        line-height: 70px;
    }

    .nav-name {
        font-size: 22px;
    }

    .nav-logo span {
        font-size: 3.5em;
        top: -12px;
        right: -14px;
    }

    /* القائمة المفتوحة */
    .nav-menu {
        top: 70px;
    }

    .nav_menu_list li {
        padding-block: 8px;
    }

    .nav-link {
        font-size: 18px;
        padding-inline: 14px;
    }

}


/* ── SECTION HEADINGS - موبايل ── */
@media only screen and (max-width: 480px) {

    .top-header h1 {
        font-size: 26px;
    }

    .top-header p,
    .top-header span {
        font-size: 13px;
    }

}


/* ── FOOTER - موبايل ── */
@media only screen and (max-width: 480px) {

    footer {
        padding-block: 30px 40px;
        row-gap: 20px;
    }

    .bottom-footer {
        font-size: 13px;
        text-align: center;
        padding-inline: 20px;
    }

}

/* Final mobile navigation overrides (kept last so they win over legacy rules). */
@media only screen and (max-width: 900px) {
    nav {
        height: 74px;
        line-height: 74px;
        padding-inline: 16px;
    }

    .nav-name {
        font-size: clamp(19px, 5vw, 25px);
    }

    .nav-logo span {
        top: -13px;
        right: -12px;
        font-size: 3em;
    }

    .nav-menu {
        top: 74px;
        height: calc(100dvh - 74px);
        padding-block: 28px;
    }

    .nav_menu_list li {
        padding-block: 0;
    }

    .nav-link {
        font-size: 16px;
        padding: 13px 16px;
    }
}

@media only screen and (max-width: 480px) {
    nav {
        padding-inline: 12px;
    }

    .nav-name {
        font-size: 18px;
    }

    .nav-logo span {
        right: -9px;
        font-size: 2.7em;
    }
}

@media only screen and (max-width: 360px) {
    nav {
        padding-inline: 10px;
    }

    .nav-name {
        font-size: 16px;
    }
}

/* Scroll state is controlled by NavigationController without inline styles. */
nav.is-scrolled {
    height: 70px;
    line-height: 70px;
    box-shadow: 0 1px 12px rgba(15, 23, 42, .12);
}

/* Keep certificate provider rows aligned with the page content. */
.certifications-container,
.cert-provider-row,
.cert-provider-header {
    width: 100%;
    min-width: 0;
}

.cert-provider-header h2 {
    overflow-wrap: anywhere;
}

@media only screen and (max-width: 900px) {
    nav.is-scrolled {
        height: 74px;
        line-height: 74px;
    }
}
