:root {
    --primary-color: #000000; /* Dark text/button background */
    --secondary-color: #6c757d; /* Secondary text */
    --accent-color: #007bff; /* A contrasting color for CTAs if needed */
    --background-color: #ffffff; /* White background */
    --surface-color: #f8f9fa; /* Light grey for cards/subtle elements */
    --text-color: #212529; /* Dark text */
    --text-light-color: #6c757d; /* Lighter text for paragraphs */
    --border-color: #e9ecef; /* Light border */
    --font-family: 'Inter', sans-serif;
}

.dark-mode {
    --primary-color: #ffffff;
    --secondary-color: #adb5bd;
    --background-color: #1a1a1a;
    --surface-color: #2c2c2c;
    --text-color: #ffffff;
    --text-light-color: #adb5bd;
    --border-color: #444444;
}

.theme-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: 1rem;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.theme-toggle:hover {
    color: var(--accent-color);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* --- Header --- */
.main-header {
    background-color: var(--background-color);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

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

.logo {
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--primary-color);
    text-decoration: none;
}

.main-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
}

.main-nav ul li {
    margin-left: 2.5rem;
}

.main-nav a {
    color: var(--text-light-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 1rem;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--primary-color);
}

.btn-contact {
    background-color: var(--primary-color);
    color: #fff !important;
    padding: 0.7rem 1.5rem;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.btn-contact:hover {
    background-color: #343a40;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--primary-color);
    cursor: pointer;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 0.9rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

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

.primary-btn:hover {
    background-color: #343a40;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.secondary-btn {
    background-color: var(--surface-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.secondary-btn:hover {
    background-color: var(--border-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.08);
}

/* --- Sections --- */
main {
    padding-top: 0; /* Header is sticky */
}

section {
    padding: 8rem 0;
    background-color: var(--background-color);
}

section h2 {
    font-size: 2.8rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    line-height: 1.2;
}

section .subtitle {
    font-size: 1.2rem;
    color: var(--text-light-color);
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem auto;
}

/* --- Hero Section --- */
.hero-section {
    text-align: center;
    padding: 10rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}

.hero-section h1 {
    font-size: 3.8rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    color: var(--primary-color);
}

.hero-section .subtitle {
    font-size: 1.4rem;
    margin-bottom: 3rem;
    max-width: 700px;
}

/* --- About Section --- */
.about-section p {
    font-size: 1.1rem;
    color: var(--text-light-color);
    max-width: 800px;
    margin: 0 auto 1.5rem auto;
    text-align: center;
}

/* --- Skills Section --- */
.skills-section h2 {
    margin-bottom: 3rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
}

.skill-item {
    background-color: var(--surface-color);
    padding: 1.2rem 1rem;
    border-radius: 5px;
    text-align: center;
    font-weight: 600;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* --- Projects Section --- */
.projects-section h2 {
    margin-bottom: 3rem;
}

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

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

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.project-card .card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--primary-color);
}

.project-card p {
    font-size: 1rem;
    color: var(--text-light-color);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-top: auto; /* Pushes links to the bottom */
}

/* --- Testimonials Section --- */
.testimonials-section h2 {
    margin-bottom: 3rem;
}

.video-testimonial {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto 4rem auto;
    background-color: var(--surface-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.video-testimonial iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

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

.testimonial-card {
    background-color: var(--surface-color);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.testimonial-text {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    font-style: italic;
}

.testimonial-author {
    font-weight: 600;
    color: var(--primary-color);
    text-align: right;
}

/* --- Contact Section --- */
.contact-section h2 {
    margin-bottom: 1.5rem;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto 3rem auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: var(--surface-color);
    color: var(--text-color);
    font-family: var(--font-family);
    font-size: 1rem;
}

.contact-form input::placeholder, .contact-form textarea::placeholder {
    color: var(--text-light-color);
}

.contact-form .primary-btn {
    align-self: center;
    width: auto;
    min-width: 200px;
}

.social-links {
    text-align: center;
    margin-top: 2rem;
}

.social-links p {
    font-size: 1.1rem;
    color: var(--text-light-color);
    margin-bottom: 1rem;
}

.social-links a {
    color: var(--primary-color);
    text-decoration: none;
    margin: 0 1rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--accent-color);
}

/* --- Footer --- */
.main-footer {
    text-align: center;
    padding: 2.5rem 0;
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color);
}

.main-footer p {
    color: var(--text-light-color);
    font-size: 0.95rem;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .main-header .container {
        flex-wrap: wrap;
    }

    .main-nav {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: var(--background-color);
        border-top: 1px solid var(--border-color);
        position: absolute;
        top: 100%;
        left: 0;
        padding: 1rem 0;
    }

    .main-nav.active {
        display: flex;
    }

    .main-nav ul {
        flex-direction: column;
        width: 100%;
    }

    .main-nav ul li {
        margin: 0.8rem 0;
        text-align: center;
    }

    .btn-contact {
        margin-top: 1rem;
    }

    .mobile-toggle {
        display: block;
    }

    .hero-section {
        padding: 8rem 0;
    }

    .hero-section h1 {
        font-size: 2.8rem;
    }

    .hero-section .subtitle {
        font-size: 1.1rem;
    }

    section {
        padding: 5rem 0;
    }

    section h2 {
        font-size: 2.2rem;
    }

    section .subtitle {
        font-size: 1rem;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-card img {
        height: 180px;
    }

    .contact-form .primary-btn {
        width: 100%;
    }

    .social-links a {
        margin: 0 0.5rem;
    }
}
