:root {
    /* Define some Material Design 3 inspired colors */
    --md-sys-color-primary: #6750A4;
    --md-sys-color-on-primary: #FFFFFF;
    --md-sys-color-primary-container: #EADDFF;
    --md-sys-color-on-primary-container: #21005D;
    --md-sys-color-secondary: #625B71;
    --md-sys-color-on-secondary: #FFFFFF;
    --md-sys-color-secondary-container: #E8DEF8;
    --md-sys-color-on-secondary-container: #1D192B;
    --md-sys-color-tertiary: #7D5260;
    --md-sys-color-on-tertiary: #FFFFFF;
    --md-sys-color-tertiary-container: #FFD8E4;
    --md-sys-color-on-tertiary-container: #31111D;
    --md-sys-color-error: #BA1A1A;
    --md-sys-color-on-error: #FFFFFF;
    --md-sys-color-error-container: #FFDAD6;
    --md-sys-color-on-error-container: #410002;
    --md-sys-color-background: #FFFBFF;
    --md-sys-color-on-background: #1C1B1F;
    --md-sys-color-surface: #FFFBFF;
    --md-sys-color-on-surface: #1C1B1F;
    --md-sys-color-surface-variant: #E7E0EC;
    --md-sys-color-on-surface-variant: #49454F;
    --md-sys-color-outline: #79747E;
    --md-sys-color-shadow: #000000;
    --md-sys-color-inverse-surface: #313033;
    --md-sys-color-inverse-on-surface: #F4EFF4;
    --md-sys-color-inverse-primary: #D0BCFF;
    --md-sys-color-surface-tint: #6750A4;

    /* MD3 Typography-inspired font sizes and weights */
    --md3-display-large-size: 3.5rem;
    --md3-headline-medium-size: 2rem;
    --md3-title-large-size: 1.375rem;
    --md3-body-large-size: 1rem;
    --md3-body-medium-size: 0.875rem;
    --md3-body-small-size: 0.75rem;
}

body {
    font-family: 'Inter', sans-serif; /* Using Inter for that MD3 feel */
    margin: 0;
    background-color: var(--md-sys-color-background);
    color: var(--md-sys-color-on-background);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Base styles for MD3 elements */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700; /* Bolder headings */
    margin-top: 0;
    margin-bottom: 0.5em;
}

/* For all Material Design 3 buttons */
md-outlined-button,
md-filled-button {
    --md-outlined-button-label-text-font: 'Roboto', sans-serif;
    --md-filled-button-label-text-font: 'Roboto', sans-serif;
    font-family: 'Roboto', sans-serif; /* Good for general styling if the custom property doesn't cover everything */
}

.md3-display-large { font-size: var(--md3-display-large-size); font-weight: 700; line-height: 1.2; }
.md3-headline-medium { font-size: var(--md3-headline-medium-size); font-weight: 500; line-height: 1.3; }
.md3-title-large { font-size: var(--md3-title-large-size); font-weight: 500; line-height: 1.4; }
.md3-body-large { font-size: var(--md3-body-large-size); font-weight: 400; line-height: 1.5; }
.md3-body-medium { font-size: var(--md3-body-medium-size); font-weight: 400; line-height: 1.5; }
.md3-body-small { font-size: var(--md3-body-small-size); font-weight: 400; line-height: 1.5; }


/* Header Styling - Mimics MD3 Top App Bar */
.md3-header {
    background-color: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
    padding: 1rem 2rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow for elevation */
    border-bottom: 1px solid var(--md-sys-color-outline); /* A slight separator */
    position: sticky;
    top: 0;
    z-index: 1000;
}

.md3-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.md3-nav .logo {
    font-size: var(--md3-headline-medium-size); /* Larger logo text */
    font-weight: 700;
    color: var(--md-sys-color-primary); /* Primary color for logo */
    padding: 0.5rem 0; /* Add padding for touch targets */
}

.md3-nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.5rem; /* Space out links */
    flex-wrap: wrap; /* Allow wrapping */
}

.md3-nav-links a {
    text-decoration: none;
    color: var(--md-sys-color-on-surface-variant);
    font-size: var(--md3-body-large-size);
    font-weight: 500; /* Medium weight for links */
    padding: 0.5rem 0; /* Add padding for touch targets */
    transition: color 0.3s ease, background-color 0.3s ease, border-radius 0.3s ease;
    position: relative;
    overflow: hidden; /* For ripple effect if applied later */
    border-radius: 8px; /* Slightly rounded for subtle MD3 feel */
}

.md3-nav-links a:hover {
    color: var(--md-sys-color-primary);
    background-color: var(--md-sys-color-primary-container);
    border-radius: 12px; /* More rounded on hover */
}

/* Main Content Area */
.md3-main-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem; /* Smaller padding for mobile */
}

@media (min-width: 768px) {
    .md3-main-content {
        padding: 0 2rem; /* Larger padding for desktop */
    }
}

/* Hero Section */
.md3-hero-section {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--md-sys-color-primary-container) 0%, var(--md-sys-color-secondary-container) 100%);
    color: var(--md-sys-color-on-primary-container); /* Text color contrasting the gradient */
    border-radius: 28px; /* MD3 large rounded corners */
    margin-bottom: 2rem;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15); /* Deeper shadow for prominence */
}

.md3-hero-section p {
    margin-bottom: 2rem;
    color: var(--md-sys-color-on-primary-container); /* Ensure text color is readable on gradient */
}

/* Material Design Buttons - styled by MWC, but ensure alignment */
md-filled-button, md-outlined-button, md-text-button {
    --md-sys-color-primary: var(--md-sys-color-primary); /* Inherit primary color */
    --md-ref-palette-primary80: var(--md-sys-color-primary); /* For filled button background */
    --md-ref-palette-primary10: var(--md-sys-color-primary-container); /* For contained elements */
    --md-sys-color-on-primary: var(--md-sys-color-on-primary); /* For text on primary background */
    --md-text-button-container-shape: 20px; /* Adjust button corner radius */
    --md-filled-button-container-shape: 20px;
    --md-outlined-button-container-shape: 20px;
    margin: 0.5rem; /* Space out buttons if multiple */
}

/* Card Sections - Mimics MD3 cards */
.md3-card-section {
    margin-bottom: 2rem;
}

.md3-card {
    background-color: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
    padding: 2rem;
    border-radius: 16px; /* MD3 medium rounded corners for cards */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08); /* Card elevation */
    border: 1px solid var(--md-sys-color-outline); /* Subtle border */
}

/* Project Grid for Featured Projects */
.md3-project-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive grid */
    margin-top: 1.5rem;
}

.md3-project-card {
    background-color: var(--md-sys-color-surface-container-low); /* Lighter surface for nested cards */
    padding: 1rem;
    border-radius: 12px; /* Slightly smaller radius for inner cards */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* Lighter shadow */
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Align content to start */
    border: 1px solid var(--md-sys-color-outline-variant); /* Even subtler border */
}

.md3-project-image {
    width: 100%;
    height: 150px; /* Fixed height for consistent image display */
    object-fit: cover; /* Cover the area, cropping if necessary */
    border-radius: 8px; /* Rounded corners for images */
    margin-bottom: 1rem;
}

/* Footer Styling */
.md3-footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--md-sys-color-surface-tint); /* A deeper color for the footer */
    color: var(--md-sys-color-on-primary); /* White text on darker background */
    font-size: var(--md3-body-small-size);
}

.md3-socials {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.md3-socials img {
    width: 24px;
    height: 24px;
    filter: invert(100%); /* Make icons white */
}

.md3-socials a {
    display: inline-flex; /* For better icon centering */
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: inherit;
    padding: 0.5rem; /* Larger touch target */
    border-radius: 50%; /* Circle shape for social icons */
    transition: background-color 0.3s ease;
}

.md3-socials a:hover {
    background-color: rgba(255, 255, 255, 0.2); /* Light hover effect */
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .md3-nav {
        flex-direction: column;
        align-items: flex-start;
    }

    .md3-nav-links {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
        margin-top: 1rem;
    }

    .md3-nav-links li {
        width: 100%;
        text-align: center;
    }

    .md3-nav-links a {
        display: block; /* Make links take full width */
        padding: 0.75rem 0;
    }

    .md3-display-large {
        font-size: 2.5rem; /* Adjust for smaller screens */
    }

    .md3-hero-section {
        padding: 3rem 1rem;
    }

    .md3-card {
        padding: 1.5rem;
    }
}
