/* ============================================
   PROF.  Professor Dr, Dr Lubega Muhamadi - PROFESSIONAL WEBSITE
   Font: Poppins only
   Color Scheme: Navy (#0a2540) + Gold (#d4af37)
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: radial-gradient(circle at top, rgba(10, 37, 64, 0.05), rgba(255, 255, 255, 0.98) 45%);
    color: #1a1a2e;
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
}

.page {
    display: none;
    scroll-margin-top: 100px;
}

.page.active-page {
    display: block;
}

/* Color Variables */
:root {
    --primary: #0a2540;
    --primary-dark: #051a2c;
    --primary-light: #1a4a6f;
    --primary-lighter: #2c6a9f;
    --secondary: #d4af37;
    --secondary-dark: #b8960c;
    --secondary-light: #f0d889;
    --gray-light: #f8f9fa;
    --gray: #6c757d;
    --gray-dark: #343a40;
    --white: #ffffff;
    --success: #28a745;
    --accent-blue: #1e5a96;
    --accent-dark-blue: #0d3d66;
    --shadow-sm: 0 5px 15px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 15px 40px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 25px 60px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 40px 80px rgba(0, 0, 0, 0.2);

    /* Legacy Color Variables for Compatibility */
    --primary-color: #6B1423;
    --primary-dark-color: #6B1423;
    --primary-light-compat: #8B3A3A;
    --secondary-color: #c9a227;
    --accent-color: #c9a227;
    --text-dark: #4a5568;
    --text-medium: #666666;
    --off-white: #f8f9fa;
    --gray-light-color: #e9ecef;
    
}




/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-light);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 4px;
}

/* ============================================
   NAVIGATION
   ============================================ */

.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
    background: rgba(255, 255, 255, 0.98);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #9a0707;
    letter-spacing: -0.5px;
}

.logo h1 span { color:#d6a406; }

.logo p {
    font-size: 0.65rem;
    letter-spacing: 2.5px;
    color: #f93c3c;;
    font-weight: 700;
}



.nav-links {
    display: flex;
    gap: 1.8rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-links a {
    text-decoration: none;
    font-weight: 600;
    color: var(--primary);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: 0.95rem;
    position: relative;
    cursor: pointer;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 2.5px;
    background: linear-gradient(90deg, var(--secondary), var(--secondary-light));
    transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 2px;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}



.btn-outline-nav {
    border: 2.5px solid var(--secondary);
    padding: 0.5rem 1.4rem;
    border-radius: 50px;
    background: transparent;
    color: var(--secondary);
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-outline-nav:hover {
    background: var(--secondary);
    color: var(--primary);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.3);
    transform: translateY(-2px);
}

.btn-outline-nav::after {
    display: none;
}

.menu-toggle {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--primary);
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, var(--primary-light-compat) 100%);
    color: var(--white);
    padding: 140px 5% 90px;
    margin-top: 70px;
    min-height: calc(3vh - 70px);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 70%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.12) 0%, transparent 70%);
    pointer-events: none;
    animation: float 20s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -30%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(30, 90, 150, 0.1) 0%, transparent 70%);
    pointer-events: none;
    animation: float 25s ease-in-out infinite reverse;
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-center {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-text h4 {
    color: var(--secondary-light);
    letter-spacing: 4px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    font-weight: 700;
    animation: slideInLeft 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-text h1 {
    font-size: 3.2rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    line-height: 1.15;
    letter-spacing: -1px;
    animation: fadeInUp 0.9s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-text .badge {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.1));
    display: inline-block;
    padding: 0.6rem 1.4rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    margin: 1rem 0;
    border: 1px solid rgba(212, 175, 55, 0.3);
    animation: fadeInUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s backwards;
}

.hero-text p {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s backwards;
    line-height: 1.8;
}


/* Buttons */
.btn-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    color: var(--primary);
    padding: 0.95rem 2.2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-block;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.3);
    letter-spacing: 0.3px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-dark) 0%, #a07b09 100%);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(212, 175, 55, 0.4);
}

.btn-secondary {
    border: 2.5px solid var(--white);
    background: transparent;
    color: var(--white);
    padding: 0.85rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-block;
    cursor: pointer;
    letter-spacing: 0.3px;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--secondary);
    color: var(--secondary);
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(212, 175, 55, 0.2);
}

/* Hero Image Container */
 .hero-image {
     display: flex;
     justify-content: center;
     align-items: center;
     min-height: 420px;
 }

/* Profile Card */
 .profile-circle {
     width: 100%;
     max-width: 500px;
     margin: 0 auto;
     background: #ffffff;
     border-radius: 30px;
     padding: 1rem;
     box-shadow: 0 25px 55px rgba(10, 37, 64, 0.12);
     border: 1px solid rgba(15, 23, 42, 0.08);
     position: relative;
     overflow: hidden;
     animation: slideInRight 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s backwards;
 }

 .profile-circle::before {
     content: "";
     position: absolute;
     top: 0;
     left: 0;
     width: 100%;
     height: 6px;
     background: linear-gradient(90deg, var(--secondary-light), var(--secondary));
 }

 .profile-placeholder {
     width: 100%;
     aspect-ratio: 1 / 1;
     background: linear-gradient(135deg, #0f274d, #102e60);
     border-radius: 24px;
     display: flex;
     align-items: center;
     justify-content: center;
     font-size: 4rem;
     color: var(--secondary);
 }

/* Profile Image Styling */
 .profile-image {
     width: 100%;
     height: auto;
     max-height: 380px;
     object-fit: cover;
     object-position: center;
     border-radius: 5px;
     display: block;
     box-shadow: 0 18px 35px rgba(10, 37, 64, 0.14);
     animation: fadeInUp 0.10s ease-out 0.3s backwards;
 }

.profile-caption {
    margin-top: 1.8rem;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    color: var(--primary-dark);
    letter-spacing: 0.2px;
    background: var(--secondary);
    border-radius: 10px;
    transition: all 0.3s ease;
    padding: 0.8rem 2rem;
}
/* Hide placeholder if image loads successfully */
.profile-image:not([src=""]) ~ #placeholder-icon {
    display: none;
}

/* Fallback placeholder styling */
#placeholder-icon {
    position: absolute;
    width: 100%;
    aspect-ratio: 1/1;
    background: linear-gradient(135deg, #2c5a8c, #0a2540);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--secondary);
}

/* Stats */
.stats {
    display: flex;
    justify-content: space-between;
    margin-top: 2.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.stat-item {
    text-align: center;
    flex: 1;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(212, 175, 55, 0.02));
    padding: 1rem;
    border-radius: 18px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(212, 175, 55, 0.15);
}

.stat-item:hover {
    transform: scale(1.08) translateY(-5px);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(212, 175, 55, 0.08));
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.15);
}

.stat-number {
    font-size: 2rem;
    font-weight: 900;
    color: var(--secondary);
    display: block;
    margin-bottom: 0.3rem;
}

.stat-label {
    font-size: 0.7rem;
    font-weight: 500;
    opacity: 0.8;
}

/* ============================================
   SECTIONS
   ============================================ */

.section {
    padding: 80px 5%;
    max-width: 1400px;
    margin: 0 auto 2rem;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 32px;
    box-shadow: var(--shadow-sm);
}

.section-title {
    text-align: center;
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--secondary), transparent);
    opacity: 0;
    animation: slideDown 0.8s ease-out 0.3s forwards;
}

.section-subtitle {
    text-align: center;
    color: var(--gray);
    margin-bottom: 2.5rem;
    font-size: 0.95rem;
}

.divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--secondary), transparent);
    margin: 1.5rem auto 2.5rem;
    border-radius: 2px;
    animation: expandWidth 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes expandWidth {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 80px;
        opacity: 1;
    }
}

/* ============================================
   CARDS GRID
   ============================================ */

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.card {
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
    border: 1px solid rgba(212, 175, 55, 0.08);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
    transition: left 0.6s ease;
}

.card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: rgba(212, 175, 55, 0.2);
}

.card:hover::before {
    left: 100%;
}

.card-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--secondary-light) 0%, var(--secondary) 100%);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.25);
}

.card-icon i {
    font-size: 2.2rem;
    color: var(--primary);
    transition: all 0.3s ease;
}

.card:hover .card-icon {
    transform: rotate(-10deg) scale(1.12);
    box-shadow: 0 15px 35px rgba(212, 175, 55, 0.35);
}

.card h3 {
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
    color: var(--primary);
    font-weight: 700;
}

.card p {
    color: var(--gray);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

/* ============================================
   SERVICES PAGE SPECIFIC
   ============================================ */

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
    border: 1px solid rgba(212, 175, 55, 0.08);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary), var(--secondary-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.service-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: rgba(212, 175, 55, 0.2);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--secondary-light) 0%, var(--secondary) 100%);
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.8rem;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.service-icon i {
    font-size: 2.8rem;
    color: var(--primary);
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    transform: rotate(-15deg) scale(1.15);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.4);
}

.service-card h3 {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 1rem;
    font-weight: 700;
}

.service-card p {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
}

.quote-badge {
    background: var(--primary);
    color: var(--secondary);
    padding: 0.3rem 1rem;
    border-radius: 30px;
    font-size: 0.7rem;
    display: inline-block;
    font-weight: 600;
    letter-spacing: 1px;
}

/* ============================================
   ACHIEVEMENTS PAGE
   ============================================ */

.achievement-list {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}

.achievement-item {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 24px;
    border-left: 6px solid var(--secondary);
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.achievement-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.08), transparent);
    transition: left 0.6s ease;
}

.achievement-item:hover {
    transform: translateX(12px) translateY(-5px);
    box-shadow: var(--shadow-md);
    border-left-width: 8px;
}

.achievement-item:hover::before {
    left: 100%;
}

.badge-year {
    background: var(--primary);
    color: var(--secondary);
    padding: 0.3rem 1rem;
    border-radius: 30px;
    font-size: 0.7rem;
    display: inline-block;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.achievement-item h3 {
    color: var(--primary);
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
}

.achievement-item p {
    color: var(--gray);
    font-size: 0.9rem;
}

/* ============================================
   PUBLICATIONS PAGE
   ============================================ */

.publication-item {
    background: var(--white);
    padding: 1.5rem 2rem;
    margin-bottom: 1.2rem;
    border-radius: 18px;
    border: 2px solid #e9ecef;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.publication-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(180deg, var(--secondary), transparent);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.publication-item:hover {
    border-color: var(--secondary);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.15);
    transform: translateX(8px) translateY(-3px);
}

.publication-item:hover::before {
    transform: scaleY(1);
}

.publication-title {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.3rem;
    font-size: 1rem;
}

.publication-journal {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.pub-link {
    color: var(--secondary);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
}

.pub-link:hover {
    text-decoration: underline;
}

.thesis-box {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    color: var(--white);
    padding: 2.5rem;
    border-radius: 24px;
    text-align: center;
    margin-top: 2.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(10, 37, 64, 0.3);
    border: 1px solid rgba(212, 175, 55, 0.15);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.thesis-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.8s ease;
    pointer-events: none;
}

.thesis-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 70px rgba(10, 37, 64, 0.4);
}

.thesis-box:hover::before {
    left: 100%;
}

.thesis-box h3 {
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

/* ============================================
   INSTITUTIONS PAGE
   ============================================ */

.institutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.inst-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
    border: 1px solid rgba(212, 175, 55, 0.08);
    position: relative;
    overflow: hidden;
}

.inst-card::after {
    content: '';
    position: absolute;
    bottom: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.08) 0%, transparent 70%);
    transition: all 0.6s ease;
    pointer-events: none;
}

.inst-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: rgba(212, 175, 55, 0.2);
}

.inst-card:hover::after {
    bottom: -30%;
    right: -30%;
}

.inst-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--secondary-light), var(--secondary));
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.inst-icon i {
    font-size: 2.5rem;
    color: var(--primary);
}

.inst-card h3 {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.inst-location {
    color: var(--secondary);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.inst-card p {
    color: var(--gray);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.inst-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.8rem;
    border-bottom: 1px solid var(--secondary);
}

/* ============================================
   CONTACT PAGE
   ============================================ */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.info-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
}

.contact-detail {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.8rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--secondary-light), var(--secondary));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-icon i {
    font-size: 1.4rem;
    color: var(--primary);
}

.contact-detail strong {
    display: block;
    color: var(--primary);
    font-size: 0.9rem;
}

.contact-detail p {
    color: var(--gray);
    margin: 0;
    font-size: 0.9rem;
}

.form-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(212, 175, 55, 0.08);
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 14px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: rgba(255, 255, 255, 0.7);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15);
    background: var(--white);
    transform: translateY(-2px);
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    border: none;
    padding: 1.1rem;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    width: 100%;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    letter-spacing: 0.3px;
    box-shadow: 0 10px 30px rgba(10, 37, 64, 0.2);
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(10, 37, 64, 0.3);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
}

/* ============================================
   ABOUT PAGE - ROLE TEXT WITH ICONS (UPDATED)
   ============================================ */

.about-grid {
    display: grid;
    grid-template-columns: minmax(300px, 380px) 1fr;
    gap: 3.5rem;
    align-items: start;
}

.profile-box {
    background: #541a08;
    border-radius: 5px;
    padding: 2rem 1.8rem 2.2rem;
    text-align: center;
    border: 1px solid rgba(212, 175, 55, 0.2);
    box-shadow: 0 30px 70px rgba(10, 37, 64, 0.18);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    color: #ffffff;
}

.profile-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, var(--secondary-light), var(--secondary));
}

.profile-box:hover {
    transform: translateY(-6px);
    box-shadow: 0 38px 80px rgba(10, 37, 64, 0.22);
}

.profile-card-image {
    border-radius: 18px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    margin-bottom: 1.4rem;
}

.profile-image-box {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.profile-box h3 {
    color: #ffffff;
    margin: 0.25rem 0 0.4rem;
}

/* ============================================
   ROLE TEXT WITH ICONS - MAIN STYLING
   ============================================ */

.role-text {
    color: rgba(255, 255, 255, 0.85);
    margin: 0.8rem 0;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(212, 175, 55, 0.15);
}

.role-text:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
    border-color: rgba(212, 175, 55, 0.4);
}

.role-text i {
    font-size: 1.1rem;
    width: 28px;
    text-align: center;
    transition: all 0.3s ease;
}

.role-text:hover i {
    transform: scale(1.15);
}


/* Individual role icon colors */
.profile-box .role-text i.fa-university { color: #3b91ec !important; }
.profile-box .role-text i.fa-star-and-crescent { color: #2ecc71 !important; }
.profile-box .role-text i.fa-user-tie { color: #e74c3c !important; }

@keyframes islamicGlow {
    0%, 100% {
        text-shadow: 0 0 2px #2ecc71, 0 0 5px #d4af37;
    }
    50% {
        text-shadow: 0 0 8px #2ecc71, 0 0 12px #d4af37;
    }
}

/* ============================================
   PROFILE SOCIAL & CONTACT
   ============================================ */

.profile-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0 1.4rem;
}

.profile-social a {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #f0d889;
    transition: all 0.3s ease;
}

.profile-social a:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
}

.contact-card {
    text-align: left;
    margin: 0 auto 1.4rem;
    max-width: 100%;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.88);
}

.contact-item i {
    color: var(--secondary);
    min-width: 28px;
    font-size: 1.05rem;
}

.contact-item span {
    font-size: 0.96rem;
    line-height: 1.55;
}

.btn-download {
    background: var(--secondary);
    color: var(--primary-dark);
    padding: 0.95rem 1.9rem;
    border-radius: 999px;
    display: inline-block;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 16px 30px rgba(212, 175, 55, 0.22);
    position: relative;
    z-index: 10;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-download:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.3);
}

/* ============================================
   BIO SECTION
   ============================================ */

.bio {
    padding: 1.8rem;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 24px;
    box-shadow: 0 18px 45px rgba(10, 37, 64, 0.08);
}

.bio h3 {
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 1rem;
    border-bottom: 3px solid rgba(231, 123, 7, 0.16);
}

.bio p {
    margin-bottom: 1.1rem;
    color: var(--gray-dark);
}

.education-list {
    list-style: none;
    margin-top: 1.2rem;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.education-list li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: flex-start;
    padding-bottom: 2rem;
    border-bottom: 3px solid rgba(231, 123, 7, 0.16);
}

.education-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.education-list i {
    color: var(--secondary);
    min-width: 34px;
    font-size: 1.25rem;
    margin-top: 0.2rem;
}

.education-list strong {
    display: block;
    color: var(--primary-dark);
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.education-list span {
    color: var(--gray-dark);
    line-height: 1.6;
}

.cv-details {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 24px;
    padding: 1.6rem 1.5rem;
    margin: 1.8rem 0 0;
    box-shadow: 0 20px 40px rgba(10, 37, 64, 0.08);
    border: 1px solid rgba(34, 70, 113, 0.08);
}

.cv-details h4 {
    margin: 0 0 1rem;
    color: var(--primary-dark);
    font-size: 1.1rem;
}

.cv-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem 1.6rem;
}

.cv-item {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: baseline;
    color: var(--gray-dark);
    font-size: 0.95rem;
}

.cv-label {
    min-width: 8.5rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.cv-value {
    flex: 1 1 0;
}

@media (max-width: 768px) {
    .cv-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: var(--white);
    text-align: center;
    padding: 3rem 2rem;
    margin-top: 4rem;
    border-top: 2px solid rgba(212, 175, 55, 0.2);
}

.social-links {
    margin-top: 1.5rem;
}

.social-links a {
    color: var(--white);
    margin: 0 0.8rem;
    font-size: 1.3rem;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-block;
}

.social-links a:hover {
    color: var(--secondary);
    transform: translateY(-4px) scale(1.2);
}

.footer p a {
    color: #d4af37;
    text-decoration: none;
}

.footer p a:hover {
    color: #ffe68a;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 968px) {
    .menu-toggle {
    display: block;  /* Changed from 'none' to 'block' */
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--primary);
}

    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--white);
        flex-direction: column;
        padding: 2rem;
        transition: 0.3s;
        gap: 1.2rem;
        z-index: 999;
        box-shadow: var(--shadow-md);
    }

    .nav-links.active {
        left: 0;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .btn-group {
        justify-content: center;
    }

    .stats {
        flex-direction: column;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .grid-3,
    .services-grid,
    .institutions-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 1.8rem;
    }
    
    .role-text {
        font-size: 0.8rem;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 50px 5%;
    }

    .hero {
        padding: 120px 5% 60px;
    }

    .card,
    .service-card,
    .inst-card {
        padding: 1.5rem;
    }
    
    .role-text {
        font-size: 0.75rem;
        padding: 6px 10px;
    }
    
    .role-text i {
        font-size: 0.9rem;
        width: 24px;
    }
}


/* ============================================
   ADVANCED ANIMATIONS & EFFECTS
   ============================================ */

/* Keyframe Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleUp {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(212, 175, 55, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(212, 175, 55, 0.3), 0 0 20px rgba(212, 175, 55, 0.1);
    }
    50% {
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.6), 0 0 30px rgba(212, 175, 55, 0.3);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Islamic Moon & Star Special Animation */
@keyframes islamicGlow {
    0%, 100% {
        text-shadow: 0 0 2px #2ecc71, 0 0 5px #d4af37;
        transform: scale(1);
    }
    50% {
        text-shadow: 0 0 8px #2ecc71, 0 0 12px #d4af37;
        transform: scale(1.08);
    }
}

/* Apply animations to elements */
.hero-text h1 {
    animation: fadeInUp 0.8s ease-out;
}

.hero-text p {
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.btn-group {
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.profile-circle {
    animation: slideInRight 0.8s ease-out 0.3s backwards;
}

.section-title {
    animation: fadeInDown 0.6s ease-out;
}

.card {
    animation: scaleUp 0.5s ease-out;
}

/* Enhanced Card Hover Effects */
.card:hover,
.service-card:hover,
.inst-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 30px 60px rgba(212, 175, 55, 0.2);
}

.card:hover .card-icon,
.service-card:hover .service-icon,
.inst-card:hover .inst-icon {
    transform: rotate(5deg) scale(1.1);
    animation: pulse 1.5s ease-in-out infinite;
}

/* Icon Hover Effects */
.card-icon,
.service-icon,
.inst-icon,
.contact-icon {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.card-icon:hover,
.service-icon:hover,
.inst-icon:hover {
    transform: scale(1.15) rotate(-5deg);
    animation: pulse 1.5s ease-in-out infinite;
}

/* Button Hover Effects */
.btn-primary:hover,
.btn-secondary:hover {
    box-shadow: 0 15px 35px rgba(212, 175, 55, 0.3);
}

.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

/* Ripple Effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    pointer-events: none;
    animation: rippleEffect 0.6s ease-out;
}

@keyframes rippleEffect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Achievement Item Enhanced Hover */
.achievement-item {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.achievement-item:hover {
    transform: translateX(15px) skewX(-2deg);
    border-left-width: 8px;
    border-left-color: var(--secondary);
}

.achievement-item:hover::before {
    content: '→';
    position: absolute;
    left: -20px;
    animation: slideInRight 0.4s ease-out;
}

/* Publication Item Enhanced Hover */
.publication-item {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.publication-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--secondary);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.4s ease-out;
}

.publication-item:hover::before {
    transform: scaleY(1);
}

.publication-item:hover {
    transform: translateX(8px);
    border-color: var(--secondary);
}

/* Form Input Focus Animation */
.form-group {
    position: relative;
}

.form-group input,
.form-group textarea,
.form-group select {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--secondary);
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.2);
    transform: translateY(-2px);
}

.form-group.focused input,
.form-group.focused textarea,
.form-group.focused select {
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.15);
}

/* Navigation Links Enhanced */
.nav-links a {
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
}

.nav-links a::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--secondary), var(--secondary-light));
    transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-links a:hover::before {
    width: 100%;
}

/* Contact Detail Hover */
.contact-detail {
    transition: all 0.4s ease;
}

.contact-detail:hover {
    transform: translateX(10px);
}

.contact-detail:hover .contact-icon {
    animation: float 2s ease-in-out infinite;
}

/* Thesis Box Animation */
.thesis-box {
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.thesis-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: left 0.6s ease;
    pointer-events: none;
}

.thesis-box:hover::before {
    left: 100%;
}

/* Badge Pulse Animation */
.badge,
.badge-year,
.quote-badge {
    transition: all 0.3s ease;
}

.badge:hover,
.badge-year:hover,
.quote-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

/* Profile Box Animation */
.profile-box {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.profile-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(212, 175, 55, 0.2);
}

.profile-box i {
    transition: all 0.4s ease;
}

.profile-box:hover i {
    animation: float 1.5s ease-in-out infinite;
    color: var(--secondary-light);
}

/* Stats Item Animation */
.stat-item {
    transition: all 0.4s ease;
}

.stat-item:hover {
    transform: scale(1.08);
    background: rgba(255, 255, 255, 0.08);
}

.stat-number {
    transition: color 0.3s ease;
}

.stat-item:hover .stat-number {
    animation: float 1s ease-in-out infinite;
}

/* Link Hover Effects */
.inst-link {
    transition: all 0.3s ease;
    position: relative;
}

.inst-link:hover {
    color: var(--secondary);
    padding-bottom: 2px;
    border-bottom-color: var(--primary);
}

.pub-link {
    transition: all 0.3s ease;
}

.pub-link:hover {
    color: var(--secondary-dark);
    letter-spacing: 0.5px;
}

