/* --- Google Font Import --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap');

/* --- CSS Variables for easy theme management --- */
:root {
    --bg-color: #121212;
    --surface-color: #1e1e1e;
    --primary-color: #bb86fc;
    --primary-variant-color: #3700b3;
    --secondary-color: #03dac6;
    --on-surface-color: #e0e0e0;
    --on-surface-secondary-color: #a0a0a0;
    --border-color: #2c2c2c;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --font-family: 'Inter', sans-serif;
}

/* --- Global Styles & Resets --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--on-surface-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex-grow: 1;
}

/* --- Typography --- */
h1, h2, h3, h4 {
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--on-surface-color);
}

h1 {
    font-size: 3rem;
    font-weight: 700;
}

h2 {
    font-size: 2.25rem;
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 700;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    color: var(--on-surface-secondary-color);
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 2.5rem 0;
}

/* --- Header & Navigation --- */
header {
    background-color: var(--surface-color);
    padding: 1rem 5%;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 10px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

nav .logo-link img {
    height: 50px;
    width: auto;
}

nav .nav-links ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

nav .nav-links ul li a {
    font-weight: 500;
    color: var(--on-surface-color);
    padding: 0.5rem 0;
    position: relative;
}

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

nav .nav-links ul li a:hover::after {
    width: 100%;
}

.hamburger-menu {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--on-surface-color);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 2rem;
    background: linear-gradient(135deg, #1a1a1a, #121212);
    min-height: 60vh;
    overflow: hidden;
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
}

.hero-text {
    max-width: 800px;
    position: relative;
    z-index: 1;
}

.hero-text p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--on-surface-color);
}

/* --- Call to Action (CTA) Buttons --- */
.cta-button, .secondary-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    text-transform: uppercase;
    transition: background-color 0.3s ease, transform 0.2s ease, color 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    text-align: center;
}

.cta-button {
    background-color: var(--primary-color);
    color: #000;
    box-shadow: 0 4px 6px var(--shadow-color);
}

.cta-button:hover {
    background-color: var(--secondary-color);
    color: #000;
    transform: translateY(-2px);
}

.secondary-button {
    background-color: transparent;
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.secondary-button:hover {
    background-color: var(--secondary-color);
    color: #000;
}

.secondary-button.view-details {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    text-transform: none;
    border-width: 1px;
    background: var(--surface-color);
    color: var(--on-surface-secondary-color);
    border-color: var(--border-color);
}

.secondary-button.view-details:hover {
    background: var(--bg-color);
    color: var(--on-surface-color);
}


/* --- General Sections --- */
.services-overview, .featured-posts {
    padding: 4rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

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

.card {
    background-color: var(--surface-color);
    padding: 2rem;
    text-align: center;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center; 
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px var(--shadow-color);
    cursor: pointer;
}

.service-icon {
    font-size: 3.5rem; 
    color: var(--primary-color); 
    margin-bottom: 1rem;
}

.card h3 {
    margin-bottom: 0.5rem;
}

/* --- Portfolio & Blog Grids --- */
.portfolio-container, .blog-container {
    padding: 4rem 5%;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.portfolio-intro {
    max-width: 600px;
    margin: 0 auto 3rem auto;
    font-size: 1.1rem;
}

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

.portfolio-card, .blog-card {
    background-color: var(--surface-color);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.portfolio-card:hover, .blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px var(--shadow-color);
}

.portfolio-image, .blog-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

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

.card-content h3 {
    margin-bottom: 0.5rem;
}

.card-content p {
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-stack span {
    background-color: var(--primary-variant-color);
    color: var(--on-surface-color);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.button-group {
    margin-top: auto;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.button-group .cta-button {
    margin-top: 0;
}


/* --- Single Post / Project Detail --- */
.project-detail {
    max-width: 900px;
    margin: 4rem auto;
    padding: 2rem;
    background-color: var(--surface-color);
    border-radius: 12px;
    text-align: left;
}

.project-detail h2, .project-detail h3 {
    text-align: left;
    margin-top: 2rem;
}

.project-detail-image {
    width: 100%;
    margin: 1.5rem 0;
    display: block;
    border-radius: 8px;
}

.project-meta {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
}
.meta-item {
    font-size: 0.9rem;
}

.post-meta {
    font-size: 0.85rem;
    color: var(--on-surface-secondary-color);
    margin-bottom: 1rem;
    font-style: italic;
}

.back-to-blog {
    display: inline-block;
    margin-top: 2rem;
    font-weight: 500;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 2rem 0;
    border-radius: 8px;
}

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

.author-bio {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    background-color: var(--bg-color);
    border-radius: 8px;
    margin-top: 1rem;
}

.author-headshot {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h4 {
    margin-bottom: 0.5rem;
}

.author-info p {
    margin-bottom: 0;
    color: var(--on-surface-secondary-color);
    font-size: 0.9rem;
}


/* --- About & Contact Pages --- */
.content-section {
    max-width: 900px;
    margin: 4rem auto;
    padding: 2rem;
    background-color: var(--surface-color);
    border-radius: 12px;
}
.blog-post {
     max-width: 900px;
    margin: 4rem auto;
    padding: 2rem;
    background-color: var(--surface-color);
    border-radius: 12px;
    text-align: left;
}
.blog-post-image {
    width: 100%;
    max-width: 600px;
    margin: 1.5rem auto;
    display: block;
    border-radius: 8px;
}

.about-content {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
}

.headshot {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--on-surface-secondary-color);
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-color);
    color: var(--on-surface-color);
    margin-bottom: 1rem;
    font-family: var(--font-family);
}

.intake-prompt {
    text-align: center;
    margin-top: 3rem;
}

/* --- Modal Styles --- */
.modal-overlay {
    display: none;
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; 
    background-color: rgba(0,0,0,0.7);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--surface-color);
    margin: auto; 
    padding: 2rem 2.5rem;
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 600px;
    border-radius: 12px;
    position: relative;
    animation: fadeIn 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    text-align: center;
}

.close-btn {
    color: var(--on-surface-secondary-color);
    position: absolute;
    top: 10px;
    right: 25px;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: var(--on-surface-color);
}


/* --- Animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeIn {
    from {opacity: 0; transform: scale(0.95);}
    to {opacity: 1; transform: scale(1);}
}


/* --- Footer --- */
footer {
    background-color: var(--surface-color);
    text-align: center;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}


/* --- Responsive Design --- */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 75px; /* height of header */
        left: 0;
        width: 100%;
        background-color: var(--surface-color);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        border-bottom: 1px solid var(--border-color);
    }
    .nav-links.active {
        display: flex;
    }

    .nav-links ul {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .hamburger-menu {
        display: flex;
    }

    .hamburger-menu.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .hamburger-menu.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger-menu.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .portfolio-grid, .blog-grid {
        grid-template-columns: 1fr;
    }

    .about-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .author-bio {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }

    .project-meta {
        flex-direction: column;
        align-items: flex-start;
    }
}

