/* Updated Color Palette with Better Contrast */
:root {
    --primary-color: #1E40AF;    /* Slightly lighter blue for better visibility */
    --secondary-color: #059669;  /* Darker green for better contrast */
    --light-color: #F9FAFB;      /* Lighter background */
    --dark-color: #111827;       /* Darker text for better readability */
    --white-color: #FFFFFF;      /* Crisp White */
    --gray-color: #4B5563;       /* Darker gray for better readability */
    --border-color: #D1D5DB;     /* Slightly darker border */
    --primary-gradient: linear-gradient(135deg, #1E40AF 0%, #3B82F6 100%);
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --card-radius: 16px;
    --button-radius: 8px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Roboto', system-ui, sans-serif;
    font-size: 1rem;
    letter-spacing: 0.01em;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-color);
}

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

section {
    padding: 80px 0;
}

h1, h2, h3, h4 {
    font-family: 'Inter', 'Poppins', sans-serif;
    line-height: 1.2;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--button-radius);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.primary-btn:hover {
    transform: scale(1.02);
    filter: brightness(1.15);
}

.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-color);
    transform: scale(1.02);
}

.small-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.2rem;
    letter-spacing: -0.02em;
}

.section-header .underline {
    height: 4px;
    width: 60px;
    background-color: var(--secondary-color);
    margin: 15px auto 0;
}

.placeholder-image {
    background-color: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    height: auto;
    border-radius: var(--card-radius);
    color: var(--gray-color);
    font-weight: 500;
    text-align: center;
    padding: 20px;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--white-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 15px 0;
}

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

.logo h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--dark-color);
    margin: 3px 0;
    border-radius: 3px;
}

/* Mobile Menu Active States */
nav.active {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--white-color);
    flex-direction: column;
    align-items: center;
    padding: 10px 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

nav.active li {
    margin: 10px 0;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(30, 64, 175, 0.9), rgba(30, 64, 175, 0.7)), 
                url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQ0MCIgaGVpZ2h0PSI3NjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgIDxwYXRoIGZpbGw9IiMxRTQwQUYiIG9wYWNpdHk9Ii4wNSIgZD0iTTAgMGgxNDQwdjc2MEgweiIvPgogICAgPHBhdGggZD0iTTAgNzYwVjBoMTQ0MHY3NjBIMFptNzIwLTI2Mi42NEMxMDExLjIxIDQ5Ny4zNiAxNDQwIDM3OS4yMyAxNDQwIDM3OS4yM1V3NjBIMFYzNzkuMjNzNDI4Ljc5IDExOC4xMyA3MjAgMTE4LjEzeiIgZmlsbD0iIzNCODJGNiIgb3BhY2l0eT0iLjAzIi8+CiAgPC9nPgo8L3N2Zz4=') no-repeat center center;
    background-size: cover;
    opacity: 1;
    z-index: -1;
}

.hero-content {
    max-width: 600px;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    padding: 40px;
    border-radius: var(--card-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    color: var(--white-color);
}

.hero-content h1, 
.hero-content h2 {
    color: var(--white-color);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-content h1 span {
    color: var(--secondary-color);
}

.hero-content h2 {
    font-size: 1.5rem;
    color: var(--gray-color);
    margin-bottom: 20px;
    font-weight: 500;
}

.hero-content p {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    font-size: 1.25rem;
    line-height: 1.5;
    max-width: 85%;
}

.hero-buttons .btn {
    margin-right: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.hero-buttons .primary-btn {
    background: var(--secondary-color);
}

.hero-buttons .secondary-btn {
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    border: none;
}

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

.projects-filter button.active {
    background: var(--primary-gradient);
    color: var(--white-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* About Section removed */

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

.skill-category {
    background: var(--white-color);
    border-radius: var(--card-radius);
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: var(--box-shadow);
}

.skill-category h3 {
    position: relative;
    display: inline-block;
    margin-bottom: 30px;
    font-size: 1.4rem;
}

.skill-category h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--secondary-color);
}

.skills-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
}

.skill-item {
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid var(--border-color);
}

.skill-icon {
    font-size: 2.1em;
    margin-bottom: 10px;
    color: #4eb3f7;
}

.skill-item h4 {
    margin: 0;
    font-size: 1.13em;
    font-weight: 500;
    color: #e8eaf6;
    letter-spacing: 0.01em;
}

.skill-proficiency {
    display: flex;
    margin-top: 5px;
}

.skill-item .skill-proficiency {
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 8px;
    width: 100%;
}

.skill-item .skill-proficiency span {
    display: block;
    height: 100%;
    background: var(--primary-gradient);
}

.skill-item .skill-proficiency {
    display: flex;
    gap: 2px;
}

.skill-item .skill-proficiency span {
    flex: 1;
    background-color: #e0e0e0;
    height: 10px;
    border-radius: 2px;
}

.skill-item .skill-proficiency span.filled {
    background: var(--primary-gradient);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
}

.project-card {
    border-radius: var(--card-radius);
    overflow: hidden;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-image {
    height: 220px;
    position: relative;
    overflow: hidden;
}

.project-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    opacity: 0.1;
}

.project-info {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    position: relative;
}

.project-info h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--secondary-color);
}

.project-tags {
    margin: 20px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-tags span {
    background: rgba(14, 165, 233, 0.08);
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.02em;
}

.project-links {
    margin-top: auto;
}

.project-card .project-info .project-link {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 15px;
    font-size: 0.9em;
}

.project-date {
    font-size: 0.85em;
    color: var(--medium-text-color);
    margin-bottom: 15px;
    font-style: italic;
}

.project-details-segment {
    margin-bottom: 15px;
}

.project-details-segment h4 {
    font-size: 1em;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.project-details-segment p {
    font-size: 0.9em;
    line-height: 1.5;
    color: var(--dark-text-color);
}

.project-tech {
    margin-top: 15px;
}

.project-tech h4 {
    font-size: 1em;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.project-tech span {
    display: inline-block;
    background-color: var(--light-accent-bg);
    color: var(--primary-color);
    padding: 4px 8px;
    margin-right: 5px;
    margin-bottom: 5px;
    border-radius: var(--border-radius-small);
    font-size: 0.8em;
}

/* Dark mode for new project details */
body.dark-mode .project-date {
    color: var(--light-text-color-alt);
}

body.dark-mode .project-details-segment h4 {
    color: var(--secondary-color);
}

body.dark-mode .project-details-segment p {
    color: var(--light-text-color);
}

body.dark-mode .project-tech h4 {
    color: var(--secondary-color);
}

body.dark-mode .project-tech span {
    background-color: var(--dark-accent-bg);
    color: var(--accent-color1);
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background: var(--section-bg-color);
}

.contact-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Center horizontally */
    align-items: flex-start;
    gap: 40px;
    width: 100%;
    margin: 0 auto;
    max-width: 700px;
}

.contact-details {
    flex: 1;
    min-width: 280px; /* Minimileveys ennen rivittymistä */
    text-align: center; /* Keskittää sisällön, kun se on yksinään */
}

.footer-social-links {
    margin-top: 18px;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.footer-social-links a i {
    font-size: 2.6em;
    color: var(--secondary-text-color);
    transition: color 0.3s, transform 0.3s;
}

.footer-social-links a:hover i {
    color: var(--primary-color);
    transform: scale(1.13);
}


.contact-form {
    flex: none;
    min-width: 320px;
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

/* Responsive adjustments for contact section if needed */
@media (max-width: 768px) {
    .contact-content {
        flex-direction: column;
        align-items: center;
    }
    .contact-details {
        margin-bottom: 30px;
    }
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 30px 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero .container, .contact-content {
        flex-direction: column;
    }
    
    .hero-content, .contact-info {
        padding-right: 0;
        margin-bottom: 40px;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: white;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        padding: 80px 20px 20px;
        transition: right 0.3s ease;
        z-index: 999;
    }
    
    nav.active {
        right: 0;
    }
    
    nav ul {
        flex-direction: column;
    }
    
    nav ul li {
        margin: 15px 0;
    }
    
    .hamburger {
        display: flex;
        z-index: 1000;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .section-header h2 {
        font-size: 1.75rem;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        margin-top: 20px;
    }
}

@media (max-width: 576px) {
    .hero-buttons, .project-links {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    .hero-buttons .btn {
        margin-right: 0;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

/* Certifications Section */
.certifications {
    background-color: #f8fafc;
}

.certifications-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.certification-card {
    background-color: var(--white-color);
    border-radius: var(--card-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 600px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.certification-logo {
    font-size: 3rem;
    color: var(--primary-color);
    margin-right: 20px;
    min-width: 70px;
    text-align: center;
}

.certification-details h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.certification-details p {
    color: var(--gray-color);
    margin-bottom: 5px;
}

.projects-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
    gap: 10px;
}

.filter-btn {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-btn.active, .filter-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

/* GitHub Activity Styles */
#github-activity {
    text-align: left;
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.github-activity-item {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--button-radius);
    background-color: var(--white-color);
    box-shadow: var(--box-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.github-activity-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.08);
}

.github-activity-repo-line {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.github-activity-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: #28a745;
    border-radius: 50%;
    flex-shrink: 0;
}

.github-repo-link {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95em;
    text-decoration: none;
    transition: color 0.2s;
}
.github-repo-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.github-activity-message-line {
    display: block;
    margin-bottom: 6px;
}

.github-commit-link {
    font-size: 0.9em;
    color: var(--dark-color);
    text-decoration: none;
    line-height: 1.4;
}
.github-commit-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.github-commit-time {
    display: block;
    font-size: 0.8em;
    color: var(--gray-color);
}

.github-activity-loading,
.github-activity-message,
.github-activity-error {
    font-size: 0.9em;
    color: var(--gray-color);
    padding: 10px;
    display: block;
    text-align: center;
    background-color: var(--light-color);
    border-radius: var(--button-radius);
}

.github-activity-error {
    color: #D32F2F;
    font-weight: 500;
}

/* Dark Mode Specific GitHub Activity */
body.dark-mode .github-activity-item {
    background-color: var(--gray-color);
    border-color: #4B5563;
}

body.dark-mode .github-repo-link {
    color: #A5B4FC;
}
body.dark-mode .github-repo-link:hover {
    color: #C7D2FE;
}

body.dark-mode .github-commit-link {
    color: var(--light-color);
}
body.dark-mode .github-commit-link:hover {
    color: #A5B4FC;
}

body.dark-mode .github-commit-time {
    color: #9CA3AF;
}

body.dark-mode .github-activity-loading,
body.dark-mode .github-activity-message,
body.dark-mode .github-activity-error {
    background-color: var(--dark-color);
    color: #9CA3AF;
}

body.dark-mode .github-activity-error {
    color: #F87171;
}

/* Contact Section */
#contact {
    background-color: var(--white-color);
    padding-bottom: 40px;
}

#contact .container {
    max-width: 800px;
}

.contact-content {
    display: flex;
    gap: 40px;
}

.contact-info, .contact-form-container {
    flex: 1;
}

.contact-info h3, .contact-form-container h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.contact-info p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-info i {
    color: var(--secondary-color);
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.contact-form-container h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

#contactForm input[type="text"],
#contactForm input[type="email"],
#contactForm textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--button-radius);
    font-family: inherit;
    font-size: 0.95rem;
    background-color: var(--light-color);
    color: var(--dark-color);
}

#contactForm textarea {
    min-height: 120px;
    resize: vertical;
}

#contactForm input[type="text"]:focus,
#contactForm input[type="email"]:focus,
#contactForm textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(30, 64, 175, 0.2);
}

#contactForm .btn {
    width: 100%;
    padding: 15px;
    font-size: 1rem;
}

/* Dark mode for contact form */
body.dark-mode #contact {
    background-color: #1F2937;
}

body.dark-mode #contactForm input[type="text"],
body.dark-mode #contactForm input[type="email"],
body.dark-mode #contactForm textarea {
    background-color: var(--gray-color);
    color: var(--light-color);
    border-color: #4B5563;
}

body.dark-mode #contactForm input[type="text"]:focus,
body.dark-mode #contactForm input[type="email"]:focus,
body.dark-mode #contactForm textarea:focus {
    border-color: #A5B4FC;
    box-shadow: 0 0 0 2px rgba(165, 180, 252, 0.3);
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 30px 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.theme-toggle i.fa-sun {
    color: #FBBF24;
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background-color: var(--primary-color);
    width: 0%;
    z-index: 1001;
    transition: width 0.1s ease;
}

/* Dark Mode Styles */

/* Skills section card styles - always visible and strong contrast */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 24px;
    justify-content: flex-start;
}

.skill-item {
    background: #22306e !important;
    color: #e8eaf6 !important;
    border-radius: 14px !important;
    box-shadow: 0 2px 10px rgba(30, 64, 175, 0.07) !important;
    padding: 28px 20px 18px 20px !important;
    min-width: 170px;
    flex: 1 1 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: background 0.2s, box-shadow 0.2s;
    margin-bottom: 8px;
    border: 1.5px solid #4eb3f7 !important;
}

.skill-item:hover {
    background: #2b3c82 !important;
    box-shadow: 0 4px 18px rgba(30, 64, 175, 0.15) !important;
}

.skill-icon {
    font-size: 2.1em !important;
    margin-bottom: 10px !important;
    color: #4eb3f7 !important;
}

.skill-item h4 {
    margin: 0 !important;
    font-size: 1.13em !important;
    font-weight: 500 !important;
    color: #e8eaf6 !important;
    letter-spacing: 0.01em !important;
}

body.dark-mode {
    background: #19223b;
    color: #e8eaf6;
}

body.dark-mode .hero,
body.dark-mode .projects,
body.dark-mode .skills,
body.dark-mode .certifications,
body.dark-mode .work-experience-section,
body.dark-mode .contact,
body.dark-mode footer {
    background: #19223b !important;
    color: #e8eaf6 !important;
}

body.dark-mode .section-header h2,
body.dark-mode .section-title {
    color: #4eb3f7 !important;
}

body.dark-mode .project-card,
body.dark-mode .certification-card,
body.dark-mode .experience-content {
    background: #22306e !important;
    color: #e8eaf6 !important;
    border: 1px solid #25316d;
}

body.dark-mode .project-tech span,
body.dark-mode .skills-grid .skill-item {
    background: #25316d !important;
    color: #8ecae6 !important;
}


body.dark-mode .contact-section {
    background-color: #2a2a2a; /* Tummempi tausta dark modessa */
}

body.dark-mode .contact-section .section-title,
body.dark-mode .contact-section .contact-info p,
body.dark-mode .contact-section .contact-info a,
body.dark-mode .contact-section .contact-form label {
    color: var(--light-text-color);
}

body.dark-mode .contact-section .contact-form input[type="text"],
body.dark-mode .contact-section .contact-form input[type="email"],
body.dark-mode .contact-section .contact-form textarea {
    background-color: #333;
    color: var(--light-text-color);
    border: 1px solid #444;
}

body.dark-mode .contact-section .contact-form input[type="text"]::placeholder,
body.dark-mode .contact-section .contact-form input[type="email"]::placeholder,
body.dark-mode .contact-section .contact-form textarea::placeholder {
    color: #bbb;
}

body.dark-mode .contact-section .contact-form .btn {
    background-color: var(--secondary-color);
    color: var(--dark-bg-color);
}

body.dark-mode .contact-section .contact-form .btn:hover {
    background-color: var(--primary-color);
    color: var(--light-text-color);
}

/* Work Experience Section Styles */
.work-experience-section {
    padding: 80px 0;
    background-color: var(--light-bg-color);
}

.work-experience-section .section-title {
    text-align: center;
    margin-bottom: 50px;
    color: var(--dark-text-color);
}

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

.experience-timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 20px; /* Adjusted for icon/dot size */
    margin-left: -2px;
}

.experience-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 100%; /* Full width for simpler mobile layout */
    margin-bottom: 30px;
    box-sizing: border-box;
}

.experience-item:last-child {
    margin-bottom: 0;
}

.experience-dot {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 20px; /* Centered with the line */
    background-color: var(--light-bg-color);
    border: 4px solid var(--primary-color);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
    transform: translateX(-50%);
}

.experience-date {
    padding: 0 0 10px 30px; /* Align with content, past the dot */
    margin-left: 20px; /* Space from the timeline line */
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.9em;
}

.experience-content {
    padding: 15px 20px;
    background-color: var(--white-color);
    position: relative;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-left: 50px; /* Space from the timeline line + dot */
}

.experience-content h3 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.4em;
}

.experience-content .company {
    display: block;
    font-size: 1.1em;
    font-weight: 500;
    color: var(--dark-text-color);
    margin-bottom: 10px;
}

.experience-content p {
    font-size: 0.95em;
    line-height: 1.6;
    color: var(--medium-text-color);
    margin-bottom: 0;
}

/* Dark Mode for Work Experience */
body.dark-mode .work-experience-section {
    background-color: var(--dark-bg-color2);
}

body.dark-mode .work-experience-section .section-title {
    color: var(--light-text-color);
}

body.dark-mode .experience-timeline::after {
    background-color: var(--secondary-color); /* Or a lighter shade of primary */
}

body.dark-mode .experience-dot {
    background-color: var(--dark-bg-color2);
    border-color: var(--secondary-color); /* Or a lighter shade of primary */
}

body.dark-mode .experience-date {
    color: var(--accent-color1); /* Or a lighter shade */
}

body.dark-mode .experience-content {
    background-color: var(--dark-card-bg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

body.dark-mode .experience-content h3 {
    color: var(--secondary-color);
}

body.dark-mode .experience-content .company {
    color: var(--light-text-color);
}

body.dark-mode .experience-content p {
    color: var(--light-text-color-alt);
}

/* Responsive adjustments for Work Experience */
@media (max-width: 768px) {
    .experience-timeline::after {
        left: 20px;
    }

    .experience-item {
        width: 100%;
        padding-left: 50px; /* Space for dot and line */
        padding-right: 15px;
    }

    .experience-dot {
        left: 20px;
    }

    .experience-date {
        padding-left: 0; /* No extra padding from dot */
        margin-left: 30px; /* Align with content after dot */
    }

    .experience-content {
        margin-left: 30px; /* Align with date */
    }
}

/* Projects Section */