/* Custom Styles for Moses Kiprono Portfolio */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --success-color: #28a745;
    --info-color: #17a2b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Navigation */
.navbar {
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--dark-color) 0%, #2c3e50 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-image img {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border: 5px solid var(--primary-color);
}

.hero-stats h3 {
    font-size: 2.5rem;
    font-weight: bold;
}

/* Section Titles */
.section-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--primary-color);
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 3rem;
}

/* About Cards */
.about-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.about-card:hover {
    transform: translateY(-5px);
}

.about-card h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.about-card ul {
    list-style: none;
    padding-left: 0;
}

.about-card ul li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.about-card ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

.contact-info-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Expertise Cards */
.expertise-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
    height: 100%;
}

.expertise-card:hover {
    transform: translateY(-5px);
}

.card-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
}

.expertise-card h4 {
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.expertise-card ul {
    list-style: none;
    padding: 0;
    text-align: left;
}

.expertise-card ul li {
    padding: 0.3rem 0;
    position: relative;
    padding-left: 1.2rem;
}

.expertise-card ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Timeline */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 3rem;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 3rem;
}

.timeline-date {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 1rem;
    font-weight: bold;
}

.timeline-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.timeline-content h4 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* Publication Cards */
.publication-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    height: 100%;
}

.publication-card:hover {
    transform: translateY(-5px);
}

.pub-icon {
    width: 60px;
    height: 60px;
    background: var(--info-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.pub-tags {
    margin-top: 1rem;
}

.tag {
    background: var(--light-color);
    color: var(--dark-color);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.research-highlights {
    background: white;
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.highlight-stat h3 {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

/* Contact Form */
.contact-form {
    background: white;
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 5px;
    padding: 0.8rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

/* Buttons */
.btn-primary {
    background: var(--primary-color);
    border: none;
    padding: 0.8rem 2rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.btn-outline-light {
    border: 2px solid white;
    color: white;
    padding: 0.8rem 2rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background: white;
    color: var(--dark-color);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding-left: 3rem !important;
        padding-right: 1rem !important;
    }
    
    .hero-image img {
        width: 200px;
        height: 200px;
    }
    
    .hero-stats h3 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .contact-form {
        padding: 2rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading Animation */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}
/* Additional styles for updated layout */

/* Education Cards */
.education-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    height: 100%;
}

.education-card:hover {
    transform: translateY(-5px);
}

.edu-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.edu-logo {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    margin-right: 1rem;
}

.edu-info h4 {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.edu-info p {
    margin-bottom: 0.2rem;
}

.edu-details {
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

/* Certification Cards */
.cert-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
    height: 100%;
}

.cert-card:hover {
    transform: translateY(-5px);
}

.cert-icon {
    width: 60px;
    height: 60px;
    background: var(--success-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

.cert-card h5 {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.cert-id {
    font-size: 0.8rem;
    color: var(--secondary-color);
    font-family: monospace;
}

/* Open to Work Badge */
.open-to-work {
    background: #e8f5e8;
    color: #2d5a2d;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 1rem;
}

/* Enhanced Hero Stats */
.hero-stats .col-4 {
    padding: 0 10px;
}

.hero-stats h3 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.hero-stats p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Responsive adjustments for new sections */
@media (max-width: 768px) {
    .edu-header {
        flex-direction: column;
        text-align: center;
    }
    
    .edu-logo {
        margin: 0 0 1rem 0;
    }
    
    .cert-card {
        margin-bottom: 1rem;
    }
}