/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --text-color: #333;
    --border-radius: 5px;
    --box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

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

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.5em;
    color: var(--primary-color);
}

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

a:hover {
    color: #2980b9;
}

.button, .cta-button, .submit-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    font-weight: 500;
}

.button:hover, .cta-button:hover, .submit-button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    color: white;
}

.cta-button {
    padding: 12px 30px;
    font-size: 1.1rem;
    margin-top: 20px;
}

/* Header */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

header h1 {
    font-size: 1.8rem;
    color: white;
    margin-bottom: 0;
}

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

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

nav ul li a {
    color: white;
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

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

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
}

.mobile-menu-btn span {
    height: 3px;
    width: 100%;
    background-color: white;
    border-radius: 3px;
    transition: var(--transition);
}

/* Hero section */
.hero {
    background: linear-gradient(rgba(44, 62, 80, 0.9), rgba(44, 62, 80, 0.7)), url('https://images.unsplash.com/photo-1607743386760-88ac62b89b8a?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80') no-repeat center center/cover;
    color: white;
    text-align: center;
    padding: 120px 0;
}

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

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Sections */
section {
    padding: 80px 0;
}

section h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
    position: relative;
}

section h2:after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--secondary-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* About */
.about-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.about-text {
    flex: 1;
}

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

.about-image {
    flex: 1;
    text-align: center;
}

.about-image img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
}

/* Experience */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline:before {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--secondary-color);
    top: 0;
    bottom: 0;
    left: 120px;
    margin-left: -2px;
}

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

.timeline-date {
    position: absolute;
    width: 100px;
    text-align: right;
    left: 0;
    top: 0;
    font-weight: bold;
    color: var(--primary-color);
}

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

.timeline-content h3 {
    margin-top: 0;
    color: var(--secondary-color);
}

/* Services */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--light-color);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    text-align: center;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

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

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

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

.skill-category h3 {
    text-align: center;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    list-style: none;
}

.skills-list li {
    background-color: var(--secondary-color);
    color: white;
    padding: 8px 16px;
    border-radius: 30px;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Projects */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.project-card {
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.project-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.project-card p {
    margin-bottom: 20px;
}

.project-links {
    display: flex;
    justify-content: flex-start;
}

.view-all {
    text-align: center;
    margin-top: 30px;
}

/* Articles */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

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

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.article-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-content {
    padding: 20px;
}

.article-content h3 {
    margin-bottom: 10px;
}

.article-content p {
    margin-bottom: 15px;
}

.read-more {
    display: inline-block;
    color: var(--secondary-color);
    font-weight: 500;
}

/* Contact */
.contact {
    background-color: var(--light-color);
}

.contact p {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 30px;
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background-color: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.contact-form h3 {
    text-align: center;
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

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

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

.submit-button {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-logo h3 {
    color: white;
    margin-bottom: 10px;
}

.footer-links h4,
.footer-social h4 {
    color: white;
    margin-bottom: 15px;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: #ddd;
}

.footer-links ul li a:hover {
    color: var(--secondary-color);
}

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

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

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

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }

/* Success message styling */
.success-message {
    text-align: center;
    padding: 30px;
}

.success-message i {
    font-size: 3rem;
    color: #2ecc71;
    margin-bottom: 20px;
}

.success-message h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.success-message p {
    margin-bottom: 20px;
}

/* Responsive styles */
@media (max-width: 992px) {
    .about-content {
        flex-direction: column;
    }
    
    .timeline:before {
        left: 30px;
    }
    
    .timeline-date {
        width: auto;
        position: relative;
        margin-bottom: 10px;
        text-align: left;
    }
    
    .timeline-content {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    nav ul {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--primary-color);
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: 0.3s ease-in-out;
    }
    
    nav ul.show {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
    
    nav ul li {
        margin: 10px 0;
    }
    
    .mobile-menu-btn.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-btn.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .contact-info {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 576px) {
    section {
        padding: 60px 0;
    }
    
    .hero {
        padding: 80px 0;
    }
    
    .service-grid,
    .project-grid,
    .article-grid {
        grid-template-columns: 1fr;
    }
}
