/* Styles for Wang Wei's tech blog */

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

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

section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: #2c3e50;
}

.btn {
    display: inline-block;
    background-color: #3498db;
    color: #fff;
    padding: 0.7rem 2rem;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #2980b9;
}

/* Header Styles */
header {
    background-color: #2c3e50;
    color: #fff;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.5rem;
    margin: 0;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #3498db;
}

.language-switcher {
    margin-left: 1rem;
}

.lang-link {
    color: #fff;
    text-decoration: none;
    padding: 0 5px;
}

.lang-link.active {
    font-weight: bold;
    color: #3498db;
}

/* Hero Section */
.hero {
    padding: 8rem 0 4rem;
    background-color: #3498db;
    color: #fff;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

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

/* About Section */
.about {
    background-color: #f9f9f9;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: center;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.about-text p {
    margin-bottom: 1rem;
}

/* Skills Section */
.skills {
    background-color: #fff;
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-card {
    background-color: #f9f9f9;
    padding: 1.5rem;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.skill-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #3498db;
}

.skill-card ul {
    list-style: none;
}

.skill-card li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.skill-card li:before {
    content: "•";
    color: #3498db;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Experience Section */
.experience {
    background-color: #f9f9f9;
}

.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.timeline:after {
    content: '';
    position: absolute;
    width: 6px;
    background-color: #3498db;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
}

.timeline-item.left {
    left: 0;
}

.timeline-item.right {
    left: 50%;
}

.timeline-content {
    padding: 20px;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
}

.timeline-date {
    display: block;
    color: #3498db;
    font-weight: bold;
    margin-bottom: 10px;
}

.timeline-content h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

/* Projects Section */
.projects {
    background-color: #fff;
}

.project-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.project-card {
    background-color: #f9f9f9;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.project-image {
    height: 200px;
    background-color: #3498db;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.project-video {
    height: 200px;
    overflow: hidden;
}

.project-content {
    padding: 1.5rem;
}

.project-date {
    display: block;
    color: #3498db;
    margin-bottom: 0.5rem;
}

.project-content h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.read-more {
    display: inline-block;
    color: #3498db;
    text-decoration: none;
    margin-top: 1rem;
    font-weight: bold;
    transition: color 0.3s;
}

.read-more:hover {
    color: #2980b9;
}

.add-project-button {
    text-align: center;
    margin-top: 2rem;
}

/* Blog Section */
.blog {
    background-color: #f9f9f9;
}

.blog-posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.blog-post {
    background-color: #fff;
    border-radius: 5px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.blog-date {
    display: block;
    color: #3498db;
    margin-bottom: 0.5rem;
}

.blog-post h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

/* Contact Section */
.contact {
    background-color: #fff;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.contact-info h3 {
    color: #3498db;
    margin-bottom: 1.5rem;
}

.contact-detail {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.contact-detail i {
    width: 30px;
    color: #3498db;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

textarea.form-control {
    height: 150px;
}

/* Footer Styles */
footer {
    background-color: #2c3e50;
    color: #fff;
    padding: 2rem 0;
    text-align: center;
}

.social-links {
    margin-bottom: 1rem;
}

.social-links a {
    color: #fff;
    font-size: 1.5rem;
    margin: 0 0.5rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: #3498db;
}

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1001;
}

.flash-message {
    background-color: #3498db;
    color: white;
    padding: 10px 20px;
    margin-bottom: 10px;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    opacity: 1;
    transition: opacity 0.5s;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 1rem;
    }
    
    nav ul li {
        margin: 0.5rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .timeline:after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    
    .timeline-item.right {
        left: 0;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
}

.mobile-nav-toggle {
    display: none;
}

@media (max-width: 768px) {
    .mobile-nav-toggle {
        display: block;
        background: none;
        border: none;
        color: white;
        font-size: 1.5rem;
        cursor: pointer;
    }
    
    nav.mobile-nav {
        display: none;
        width: 100%;
    }
    
    nav.mobile-nav.active {
        display: block;
    }
}
