:root {
    --background-dark: #121212;
    --surface-dark: #1e1e1e;
    --primary: #39277d; /* updated accent hue to #39277d */
    --primary-light: #5e4fa5; /* updated lighter variant for hover effects */
    --text-primary-dark: #ffffff;
    --text-secondary-dark: #b3b3b3;
    --background-light: #ffffff;
    --surface-light: #f5f5f5;
    --text-primary-light: #121212;
    --text-secondary-light: #666666;
    --transition-speed: 0.3s;
    --accent-color: #39277d; /* updated to match the new accent hue */
}

[data-theme="dark"] {
    --background: var(--background-dark);
    --surface: var(--surface-dark);
    --text-primary: var(--text-primary-dark);
    --text-secondary: var(--text-secondary-dark);
}

[data-theme="light"] {
    --background: var(--background-light);
    --surface: var(--surface-light);
    --text-primary: var(--text-primary-light);
    --text-secondary: var(--text-secondary-light);
}

[data-theme="light"] {
    --background: var(--background-light);
    --surface: var(--surface-light);
    --text-primary: var(--text-primary-light);
    --text-secondary: var(--text-secondary-light);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Geist', sans-serif; /* updated to Geist for body text */
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

/* Headlines */
h1, h2, h3, h4, h5, h6 {
    font-family: 'IBM Plex Sans', sans-serif; /* updated to IBM Plex Sans for headlines */
    font-weight: 700;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background-color: var(--background);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: background-color var(--transition-speed) ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.logo span {
    color: var(--primary);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color var(--transition-speed) ease;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width var(--transition-speed) ease;
}

nav a:hover {
    color: var(--primary);
}

nav a:hover::after {
    width: 100%;
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1.2rem;
    transition: color var(--transition-speed) ease;
}

.theme-toggle:hover {
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 0 50px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.hero-text {
    flex: 1;
}

.hero-image {
    flex: 1;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.hero-image:hover img {
    transform: scale(1.05);
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero h1 span {
    color: var(--primary);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-text .social-links {
    margin-top: 2rem; /* ensure at least 2rem space between CTA button and social icons */
}

social-links {
    display: flex;
    gap: 15px;
    margin-top: 2rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--surface);
    color: var(--text-primary);
    text-decoration: none;
    transition: all var(--transition-speed) ease;
}

.social-link:hover {
    background-color: var(--primary);
    color: #000;
    transform: translateY(-3px);
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    background-color: var(--primary);
    color: #000;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    text-align: center;
}

.btn:hover {
    background-color: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 215, 0, 0.2);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: #000;
}

/* About Section */
.about {
    padding: 100px 0;
    background-color: var(--surface);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--primary);
    margin: 15px auto 0;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.about-stats {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.stat-item {
    text-align: center;
    padding: 30px 20px;
    background-color: var(--background);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform var(--transition-speed) ease;
}

.stat-item:hover {
    transform: translateY(-10px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}

.stat-title {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Services Section */
.services {
    padding: 100px 0;
}

.services-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.service-card {
    background-color: var(--surface);
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.service-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.service-description {
    color: var(--text-secondary);
}

/* Experience Section */
.experience {
    padding: 100px 0;
    background-color: var(--surface);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 50px auto 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background-color: var(--background);
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    width: 50%;
    margin-bottom: 50px;
}

.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 40px;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 40px;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--primary);
    border-radius: 50%;
    top: 15px;
    z-index: 1;
}

.timeline-item:nth-child(odd)::after {
    right: -10px;
}

.timeline-item:nth-child(even)::after {
    left: -10px;
}

.timeline-content {
    padding: 25px;
    background-color: var(--background);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.timeline-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.timeline-description {
    color: var(--text-secondary);
}

/* Portfolio Section */
.portfolio {
    padding: 100px 0;
}

.portfolio-filter {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    background-color: var(--surface);
    color: var(--text-primary);
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    font-weight: 500;
}

.filter-btn.active, .filter-btn:hover {
    background-color: var(--primary);
    color: #000;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.portfolio-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    height: 250px;
    background-color: var(--surface);
}

.portfolio-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-item:hover .portfolio-image {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-title {
    color: #fff;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.portfolio-category {
    color: var(--primary);
    margin-bottom: 15px;
}

.portfolio-link {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: var(--primary);
    color: #000;
    text-decoration: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-speed) ease;
}

.portfolio-link:hover {
    transform: translateY(-5px);
}

/* Contact Section */
.contact {
    padding: 100px 0;
    background-color: var(--surface);
}

.contact-container {
    display: flex;
    gap: 50px;
    margin-top: 50px;
}

.contact-info {
    flex: 1;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background-color: var(--background);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
    margin-right: 15px;
}

.contact-text h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.contact-text p, .contact-text a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

.contact-text a:hover {
    color: var (--primary);
}

.contact-form {
    flex: 1;
}

.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    background-color: var(--background);
    border: none;
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
}

.form-control:focus {
    outline: 2px solid var(--primary);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Footer */
footer {
    padding: 40px 0;
    text-align: center;
    color: var(--text-secondary);
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
    display: inline-block;
}

.footer-logo span {
    color: var(--primary);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

.footer-link:hover {
    color: var(--primary);
}

.copyright {
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 991px) {
    .hero-content, .about-content, .contact-container {
        flex-direction: column;
    }

    .hero-image {
        margin-top: 30px;
    }

    .timeline::after {
        left: 40px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 80px;
        padding-right: 0;
    }

    .timeline-item:nth-child(odd), .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-item::after {
        left: 30px;
    }
}

@media (max-width: 768px) {
    nav ul {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--background);
        flex-direction: column;
        padding: 20px;
        gap: 1rem;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        z-index: 100;
    }

    nav ul.show {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 2rem;
    }

    .service-card, .portfolio-item {
        min-height: initial;
    }

    .stat-item {
        padding: 20px 15px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .portfolio-filter {
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}