/**
 * Joshua Ochieng Otieno - Portfolio Website
 * Deep Blue + Gold Premium Theme
 */

/* CSS Variables */
:root {
    --primary-blue: #0f172a;
    --secondary-blue: #1e3a8a;
    --accent-gold: #d4a853;
    --accent-gold-light: #f0d78c;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --bg-dark: #0a0f1a;
    --bg-card: #111827;
    --transition: all 0.3s ease;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Sticky Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    padding: 0.75rem 5%;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: #333;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #667eea;
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: #667eea;
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section - Bright & Modern */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Bright gradient background */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    position: relative;
    overflow: hidden;
}

/* Decorative circles */
.hero::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -150px;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

/* Hero Container - Split Layout */
.hero-container {
    max-width: 1200px;
    width: 100%;
    padding: 0 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    z-index: 1;
}

/* Left Side - Photo */
.hero-left {
    flex: 0 0 400px;
    display: flex;
    justify-content: center;
}

/* Right Side - Description */
.hero-right {
    flex: 1;
    color: white;
}

/* Profile Image - Round border with glow */
.hero-profile {
    position: relative;
}

.hero-profile::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 3px solid white;
    border-radius: 50%;
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.profile-image {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid white;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* Fallback - Show initials if no image */
.hero-profile.show-initials::before {
    display: none;
}

.hero-profile.show-initials .profile-image {
    display: none;
}

.hero-profile-initials {
    display: none;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    font-size: 5rem;
    font-weight: 700;
    align-items: center;
    justify-content: center;
    border: 6px solid white;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.hero-profile.show-initials .hero-profile-initials {
    display: flex;
    animation: float 3s ease-in-out infinite;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-title-large {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.hero-title-large p {
    color: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.5rem;
}

.hero-title-large i {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px;
    border-radius: 50%;
    font-size: 1rem;
}

.hero-tagline {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2rem;
    font-style: italic;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.hero-social {
    display: flex;
    gap: 1rem;
}

.hero-social .social-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.hero-social .social-icon:hover {
    background: white;
    color: #667eea;
}

/* Responsive */
@media (max-width: 992px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
        padding-top: 100px;
        padding-bottom: 50px;
    }
    
    .hero-left {
        flex: none;
    }
    
    .hero-title-large p {
        justify-content: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-social {
        justify-content: center;
    }
    
    .profile-image {
        width: 220px;
        height: 220px;
    }
    
    .hero-profile-initials {
        width: 220px;
        height: 220px;
        font-size: 3rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
}

.btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #b8942f 100%);
    color: var(--primary-blue);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(212, 168, 83, 0.3);
}

.btn-secondary {
    border: 2px solid var(--accent-gold);
    color: var(--accent-gold);
}

.btn-secondary:hover {
    background: var(--accent-gold);
    color: var(--primary-blue);
}

/* Section Styles */
.section {
    padding: 5rem 5%;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent-gold);
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* About Section */
.about {
    background: var(--primary-blue);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-text {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.about-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(212, 168, 83, 0.1);
    transition: var(--transition);
}

.about-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-gold);
}

.about-card i {
    font-size: 2.5rem;
    color: var(--accent-gold);
    margin-bottom: 1rem;
}

.about-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.about-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Skills Section */
.skills {
    background: var(--bg-dark);
}

.skills-container {
    max-width: 1200px;
    margin: 0 auto;
}

.skills-category {
    margin-bottom: 3rem;
}

.skills-category-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-gold);
    transform: scaleY(0);
    transition: var(--transition);
}

.skill-card:hover::before {
    transform: scaleY(1);
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.skill-icon {
    width: 50px;
    height: 50px;
    background: rgba(212, 168, 83, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.skill-icon i {
    font-size: 1.5rem;
    color: var(--accent-gold);
}

.skill-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.skill-description {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Experience Timeline */
.experience {
    background: var(--primary-blue);
}

.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, var(--accent-gold), rgba(212, 168, 83, 0.3));
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    width: 50%;
    padding-right: 2rem;
}

.timeline-item:nth-child(odd) {
    margin-left: 50%;
    padding-right: 0;
    padding-left: 2rem;
}

.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--accent-gold);
    border-radius: 50%;
    top: 0;
}

.timeline-item:nth-child(odd) .timeline-dot {
    left: -10px;
}

.timeline-item:nth-child(even) .timeline-dot {
    right: -10px;
}

.timeline-content {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.timeline-content:hover {
    border-color: var(--accent-gold);
    transform: translateX(-5px);
}

.timeline-item:nth-child(odd) .timeline-content:hover {
    transform: translateX(5px);
}

.timeline-date {
    color: var(--accent-gold);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.timeline-company {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.timeline-description {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.timeline-description ul {
    list-style: disc;
    margin-left: 1.25rem;
    margin-top: 0.5rem;
}

.timeline-description li {
    margin-bottom: 0.25rem;
}

/* Projects Section */
.projects {
    background: var(--bg-dark);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-gold);
}

.project-icon {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.project-icon.solar {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.project-icon.website {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
}

.project-icon.digital {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.project-icon.energy {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    color: white;
}

.project-content {
    padding: 1.5rem;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.project-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tech-tag {
    background: rgba(212, 168, 83, 0.1);
    color: var(--accent-gold);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.project-role {
    color: var(--accent-gold);
    font-size: 0.9rem;
    font-weight: 500;
}

.project-impact {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Education Section */
.education {
    background: var(--primary-blue);
}

.education-container {
    max-width: 800px;
    margin: 0 auto;
}

.education-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 2rem;
    transition: var(--transition);
}

.education-card:hover {
    border-color: var(--accent-gold);
    transform: translateX(10px);
}

.education-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent-gold) 0%, #b8942f 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-blue);
    flex-shrink: 0;
}

.education-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.education-info h4 {
    color: var(--accent-gold);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.education-info p {
    color: var(--text-muted);
}

.education-gpa {
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.education-gpa span {
    color: var(--accent-gold);
    font-weight: 600;
}

/* Contact Section */
.contact {
    background: var(--bg-dark);
}

.contact-container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: rgba(212, 168, 83, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-gold);
    font-size: 1.25rem;
}

.contact-text h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.contact-text p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

.contact-form {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--bg-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-light);
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--accent-gold) 0%, #b8942f 100%);
    color: var(--primary-blue);
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(212, 168, 83, 0.3);
}

.form-message {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    text-align: center;
}

.form-message.success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid #10b981;
}

.form-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid #ef4444;
}

/* Social Media Icons */
.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-icon {
    width: 45px;
    height: 45px;
    background: rgba(212, 168, 83, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-gold);
    font-size: 1.25rem;
    transition: var(--transition);
}

.social-icon:hover {
    background: var(--accent-gold);
    color: var(--primary-blue);
    transform: translateY(-3px);
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    box-shadow: 0 5px 20px rgba(37, 211, 102, 0.4);
    transition: var(--transition);
    z-index: 999;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.5);
}

/* Footer */
.footer {
    background: var(--bg-dark);
    padding: 3rem 5% 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-gold);
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--accent-gold);
    color: var(--primary-blue);
}

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item,
    .timeline-item:nth-child(odd) {
        width: 100%;
        margin-left: 0;
        padding-left: 3rem;
        padding-right: 0;
    }
    
    .timeline-item .timeline-dot,
    .timeline-item:nth-child(odd) .timeline-dot {
        left: 10px;
        right: auto;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: var(--bg-card);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: var(--transition);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .menu-toggle {
        display: block;
        z-index: 1001;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-tagline {
        font-size: 1rem;
    }
    
    .section {
        padding: 3rem 5%;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .education-card {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        padding: 0 1rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        bottom: 20px;
        right: 20px;
    }
}

