:root {
    /* Light Theme Variables */
    --bg-color: #f9f9f9;
    --text-color: #333333;
    --text-muted: #666666;
    --accent-color: #000000;
    --card-bg: #ffffff;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --particle-color: "#000000";
}

[data-theme="dark"] {
    /* Dark Theme Variables */
    --bg-color: #121212;
    --text-color: #ffffff;
    --text-muted: #aaaaaa;
    --accent-color: #ffffff;
    --card-bg: #1e1e1e;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --particle-color: "#ffffff";
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
}

/* Particles Background */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Content Wrapper to sit above particles */
.wrapper {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: var(--card-bg);
    border: none;
    color: var(--text-color);
    padding: 0.75rem;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, background-color 0.4s ease;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

/* Header */
header {
    display: block;
    text-align: center;
    align-items: center;
    padding: 0;
    margin-bottom: 0;
}

.logo img {
    height: 240px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    transition: filter 0.4s ease;
}

[data-theme="light"] .logo img {
    /* If the logo is dark text, invert it in dark mode */
    filter: invert(1);
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    margin-left: 2rem;
    font-weight: 400;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 6rem 0;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    font-weight: 300;
}

/* Portfolio Section */
.portfolio {
    padding: 4rem 0;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
}

.portfolio-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform 0.4s ease, box-shadow 0.4s ease, background-color 0.4s ease;
    cursor: pointer;
}

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

[data-theme="dark"] .portfolio-card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
}

.card-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background-color: #e0e0e0; /* Placeholder bg */
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: transform 0.5s ease;
}

.portfolio-card:hover .card-image img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.card-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Footer & Contact */
footer {
    text-align: center;
    padding: 6rem 0;
    margin-top: 4rem;
    border-top: 1px solid rgba(150, 150, 150, 0.2);
}

footer h2 {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 2rem;
}

.contact-btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: var(--accent-color);
    color: var(--bg-color);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    letter-spacing: 1px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.contact-btn:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

/* Category Pills */
.category-pills {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.pill {
    padding: 0.5rem 1.5rem;
    border: 1px solid var(--accent-color);
    background: transparent;
    color: var(--text-color);
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pill:hover, .pill.active {
    background: var(--accent-color);
    color: var(--bg-color);
}

.portfolio-card.hidden {
    display: none;
}

/* Lightbox Modal */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.lightbox.active .lightbox-content {
    transform: translateY(0);
}

.close-lightbox {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-color);
    line-height: 1;
}

.lightbox-content img {
    width: 100%;
    max-height: 50vh;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.lightbox-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.lightbox-content p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.lightbox-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.lightbox-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    background: var(--accent-color);
    color: var(--bg-color);
    transition: opacity 0.3s ease;
    display: inline-block;
}

.lightbox-btn:hover {
    opacity: 0.9;
}

.lightbox-btn.outline {
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--text-color);
}

.lightbox-btn.outline:hover {
    background: var(--accent-color);
    color: var(--bg-color);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    header {
        flex-direction: column;
        gap: 1.5rem;
        margin-bottom: 0rem;
    }
    nav a {
        margin: 0 1rem;
    }
    .portfolio {
         padding: 0;
    }
    .portfolio-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 3rem;
    }
}
