:root {
    /* Color Palette */
    --color-primary: #FF0000; /* Bright Red Accent */
    --color-background: #0D0D0D; /* Very Dark Background */
    --color-card-bg: #1A1A1A; /* Slightly Lighter Dark for Cards and CTA */
    --color-text-light: #ffffff; /* White text for headings */
    --color-text-faded: #aaaaaa; /* Faded grey text for body content */
    --font-primary: 'Poppins', sans-serif;
}

/* Global Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-background);
    color: var(--color-text-light);
    line-height: 1.6;
    scroll-behavior: smooth;
}

/* -------------------- GENERAL LAYOUT & COMPONENTS -------------------- */

section {
    padding: 80px 5%;
    max-width: 1300px;
    margin: 0 auto;
}

h1 { font-size: 3.5em; font-weight: 700; line-height: 1.1; }
h2 { font-size: 2em; font-weight: 600; }
h3 { font-size: 1.5em; font-weight: 600; margin-bottom: 20px; }
p { color: var(--color-text-faded); }

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    margin-top: 20px;
    background-color: var(--color-primary);
    color: var(--color-text-light);
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    border: 2px solid var(--color-primary);
    transition: background-color 0.3s, color 0.3s;
    cursor: pointer;
}

.btn:hover {
    background-color: transparent;
    color: var(--color-primary);
}

.btn-secondary {
    background-color: transparent;
    border-color: var(--color-text-faded);
    color: var(--color-text-faded);
}

.btn-secondary:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-text-light);
}

/* Section Title Style (Red line and small heading) */
.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.section-title .red-line {
    width: 20px;
    height: 2px;
    background-color: var(--color-primary);
}

.section-title h2 {
    font-size: 0.9em;
    text-transform: uppercase;
    color: var(--color-primary);
    font-weight: 400;
}

/* -------------------- HEADER / NAV -------------------- */

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--color-background);
    max-width: 1300px;
    margin: 0 auto;
}

header .logo {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--color-text-light);
}

nav a {
    color: var(--color-text-faded);
    text-decoration: none;
    margin-left: 30px;
    font-size: 0.85em;
    font-weight: 600;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--color-primary);
}

/* -------------------- HERO SECTION -------------------- */

.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 80vh;
    padding-top: 0;
}

.hero-content {
    flex: 1;
    max-width: 50%;
}

.hero-content p:first-child {
    font-size: 1em;
    color: var(--color-text-faded);
    margin-bottom: 5px;
}

.hero-content .subtitle {
    margin-top: 10px;
    font-size: 1.1em;
    max-width: 90%;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.hero-image img {
    max-width: 400px;
    height: auto;
    object-fit: cover;
    /* Styling to create the dark/red stylized image effect */
    filter: grayscale(100%) brightness(50%) sepia(100%) hue-rotate(330deg) saturate(300%);
    box-shadow: 0 0 50px rgba(255, 0, 0, 0.3);
}

/* -------------------- ABOUT ME SECTION -------------------- */

.about {
    display: flex;
    gap: 50px;
    align-items: flex-start;
}

.about-left {
    flex: 1;
}

.about-left img {
    width: 100%;
    height: auto;
    object-fit: cover;
    /* Apply a similar stylistic effect as the hero image */
    filter: grayscale(100%) brightness(50%) sepia(100%) hue-rotate(330deg) saturate(300%);
}

.about-right {
    flex: 2;
}

.about-right p {
    margin-bottom: 20px;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.skill-tag {
    background-color: var(--color-card-bg);
    color: var(--color-text-light);
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 0.9em;
    font-weight: 400;
    transition: background-color 0.3s;
}

.skill-tag:hover {
    background-color: var(--color-primary);
}

/* -------------------- SERVICES SECTION -------------------- */

.services-container {
    text-align: center;
}

.services-container h3 {
    margin-bottom: 40px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background-color: var(--color-card-bg);
    padding: 30px;
    text-align: left;
    border-radius: 5px;
    min-height: 200px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.red-icon {
    font-size: 2.5em;
    color: var(--color-primary);
    margin-bottom: 15px;
}

.service-card h4 {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--color-text-light);
}

/* -------------------- CTA SECTION -------------------- */

.cta {
    background-color: var(--color-card-bg);
    text-align: center;
    padding: 60px 5%;
    border-radius: 5px;
    margin-top: 50px;
}

.cta h2 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.cta p {
    max-width: 600px;
    margin: 0 auto 20px auto;
}

/* -------------------- FOOTER -------------------- */

footer {
    padding: 30px 5%;
    border-top: 1px solid var(--color-card-bg);
    max-width: 1300px;
    margin: 0 auto;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom .logo {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--color-primary); /* Use red for the footer logo for a stylish touch */
}

.social-links a {
    color: var(--color-text-faded);
    font-size: 1.2em;
    margin-left: 20px;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--color-primary);
}

/* -------------------- MEDIA QUERIES (Responsiveness) -------------------- */

@media (max-width: 1024px) {
    .about {
        flex-direction: column;
    }
    .about-left {
        width: 50%;
        margin: 0 auto;
    }
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Adjust header for mobile */
    header {
        flex-direction: column;
        text-align: center;
    }
    nav {
        margin-top: 15px;
    }
    nav a {
        margin: 0 10px;
    }

    /* Stack Hero section */
    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding-bottom: 40px;
    }
    .hero-content {
        max-width: 100%;
        margin-top: 40px;
    }
    .hero-image {
        justify-content: center;
    }
    .hero-image img {
        max-width: 250px;
    }
    .hero-content h1 {
        font-size: 2.5em;
    }

    /* Services to single column */
    .services-grid {
        grid-template-columns: 1fr;
    }

    /* Footer adjustment */
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
    }
    .social-links a {
        margin: 0 10px;
    }
}