/* 
   Portfolio Stylesheet
   Author: Aphiwe Cyril Mngadi
   Description: Professional portfolio with calm color scheme
*/

/* ===== VARIABLES ===== */
:root {
    --primary-color: #3a6ea5;
    --secondary-color: #004e98;
    --accent-color: #ff9a3c;
    --light-color: #f0f4f8;
    --dark-color: #2c3e50;
    --text-color: #333;
    --text-light: #6c757d;
    --white: #ffffff;
    --section-padding: 80px 0;
    --transition: all 0.3s ease;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --border-radius: 5px;
}

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section {
    padding: var(--section-padding);
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    color: var(--dark-color);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
}

.bg-light {
    background-color: var(--light-color);
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.primary-btn {
    background-color: var(--primary-color);
    color: var(--white);
}

.primary-btn:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

.secondary-btn {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.secondary-btn:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* ===== HEADER & NAVIGATION ===== */
header {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://images.unsplash.com/photo-1517694712202-14dd9538aa97?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    height: 100vh;
    color: var(--white);
    position: relative;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
}

nav.scrolled {
    background-color: var(--white);
    box-shadow: var(--box-shadow);
    padding: 15px 0;
}

nav.scrolled .logo,
nav.scrolled .nav-menu a {
    color: var(--dark-color);
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white);
}

.nav-menu {
    display: flex;
}

.nav-menu li {
    margin-left: 30px;
}

.nav-menu a {
    color: var(--white);
    font-weight: 600;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--white);
}

.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.hero h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.cta-buttons {
    margin-top: 30px;
}

.cta-buttons .btn {
    margin: 0 10px;
}

/* ===== ABOUT SECTION ===== */
.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: center;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.about-info {
    background-color: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.info-item {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.info-title {
    font-weight: 600;
    margin-right: 10px;
    color: var(--primary-color);
}

.info-value {
    color: var(--text-light);
}

/* ===== SKILLS SECTION ===== */
.skills-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.skill-category h3 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: var(--primary-color);
}

/* Programming Skills with Progress Bars */
.programming-skills {
    margin-bottom: 40px;
}

.prog-skill-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.prog-skill-name {
    width: 120px;
    font-weight: 600;
    color: var(--dark-color);
}

.prog-skill-bar {
    flex: 1;
    height: 10px;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.prog-skill-level {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 10px;
    width: 0;
    transition: width 1.5s ease-in-out;
}

.prog-skill-percent {
    width: 50px;
    text-align: right;
    margin-left: 15px;
    font-weight: 600;
    color: var(--primary-color);
}

/* Technical Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.skill-item {
    background-color: var(--white);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: var(--transition);
}

.skill-item:hover {
    transform: translateY(-5px);
}

.skill-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.skill-item h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.skill-item p {
    color: var(--text-light);
}

/* ===== PROJECTS SECTION ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-img {
    height: 250px;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-img img {
    transform: scale(1.1);
}

.project-info {
    padding: 25px;
}

.project-info h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.project-info p {
    color: var(--text-light);
    margin-bottom: 15px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.project-tags span {
    background-color: var(--light-color);
    color: var(--primary-color);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ===== EXPERIENCE SECTION ===== */
.timeline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.timeline-section h3 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.timeline-item {
    position: relative;
    padding-left: 30px;
    margin-bottom: 40px;
}

.timeline-dot {
    position: absolute;
    left: 0;
    top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--primary-color);
}

.timeline-date {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.timeline-content {
    background-color: var(--white);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.timeline-content h4 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.timeline-content ul {
    padding-left: 20px;
}

.timeline-content ul li {
    margin-bottom: 8px;
    position: relative;
    list-style-type: disc;
}

/* ===== COMPETENCIES SECTION ===== */
.competencies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.competency-item {
    background-color: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: var(--transition);
}

.competency-item:hover {
    transform: translateY(-5px);
}

.competency-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.competency-item h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.competency-item p {
    color: var(--text-light);
}

/* ===== CONTACT SECTION ===== */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    background-color: var(--white);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.contact-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-right: 20px;
}

.contact-text h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.contact-text p {
    color: var(--text-light);
}

.contact-form {
    background-color: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

/* ===== FOOTER ===== */
footer {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 50px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.footer-logo h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.footer-logo p {
    color: #aaa;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #aaa;
    font-size: 0.9rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media screen and (max-width: 992px) {
    .about-content,
    .timeline,
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .hero h2 {
        font-size: 1.6rem;
    }
}

@media screen and (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: var(--transition);
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 0;
    }
    
    .nav-menu a {
        display: block;
        padding: 15px;
        color: var(--dark-color);
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .skills-grid,
    .competencies-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero h2 {
        font-size: 1.4rem;
    }
}

@media screen and (max-width: 576px) {
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 40px;
    }
    
    .cta-buttons .btn {
        display: block;
        width: 100%;
        margin: 10px 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero h2 {
        font-size: 1.2rem;
    }
}