/* --- Modern Variables & Reset --- */
:root {
    --primary-dark: #1f2833;    /* Dark Navy/Charcoal for background/headers */
    --accent-color: #66fcf1;    /* Vibrant Aqua/Cyan for CTAs and highlights */
    --text-light: #c5c6c7;      /* Light Grey text on dark backgrounds */
    --text-dark: #0b0c10;       /* Dark text on light backgrounds */
    --background-light: #f5f5f5; /* Off-white for section breaks */
    --font-family: 'Poppins', sans-serif;
    --border-radius: 8px;
}
html {
    /* Enables smooth scrolling animation when navigating to anchor links (href="#id") */
    scroll-behavior: smooth;
}

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

body {
    font-family: var(--font-family);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: white;
}

/* Global Section Styling */
.section {
    padding: 80px 5%;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.section h2 {
    font-size: 2.5em;
    margin-bottom: 0.25em;
    color: var(--primary-dark);
    font-weight: 700;
}

.section-description {
    font-size: 1.1em;
    color: var(--secondary-color);
    margin-bottom: 40px;
}

/* --- CTAs (Buttons) --- */
.cta-primary, .cta-secondary, .cta-nav {
    background-color: var(--accent-color);
    display: inline-block;
    padding: 12px 30px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 1.05em;
}

.cta-primary {
    background-color: var(--accent-color);
    color: var(--primary-dark);
    border: 2px solid var(--accent-color);
    box-shadow: 0 4px 15px rgba(102, 252, 241, 0.4);
}

.cta-primary:hover {
    background-color: transparent;
    color: var(--accent-color);
}

.cta-secondary {
    background-color: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
}

.cta-secondary:hover {
    background-color: var(--accent-color);
    color: var(--primary-dark);
}

/* --- 1. Hero & Navigation --- */
.hero-section {
    background-color: var(--primary-dark);
    color: white;
    padding-bottom: 100px;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 5%;
}

.logo {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--accent-color);
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-links a:not(.cta-primary) {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 400;
}

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

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 80px auto 0;
}

.hero-content h1 {
    font-size: 3.5em;
    color: white;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-subheadline {
    font-size: 1.3em;
    color: var(--text-light);
    margin-bottom: 40px;
}

/* --- 2. Services Grid (Cards) --- */
.services-grid {
    background-color: white;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.service-card {
    padding: 30px;
    text-align: left;
    background: var(--background-light);
    border-radius: var(--border-radius);
    border-top: 4px solid var(--accent-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.service-card h3 {
    color: var(--primary-dark);
    margin-bottom: 10px;
}

/* --- 3. Tech Stack Table --- */
.tech-stack-section {
    background-color: var(--background-light);
}

.tech-table-wrapper {
    overflow-x: auto;
}

.tech-stack-section table {
    width: 100%;
    margin-top: 30px;
    border-collapse: collapse;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.tech-stack-section th, .tech-stack-section td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.tech-stack-section th {
    background-color: var(--primary-dark);
    color: var(--accent-color);
    font-weight: 600;
}

.tech-stack-section tr:nth-child(odd) {
    background-color: white;
}
.tech-stack-section tr:nth-child(even) {
    background-color: #eee;
}

/* --- 4. Features Grid --- */
.features-section {
    background-color: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
    text-align: left;
}

.feature-item {
    padding: 25px;
    border-left: 5px solid var(--accent-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    background: var(--background-light);
    border-radius: var(--border-radius);
}

.feature-item h3 {
    color: var(--primary-dark);
    margin-bottom: 10px;
}

/* --- 5. Contact Section --- */
.contact-section {
    background-color: var(--primary-dark);
    color: white;
}

.contact-section h2, .contact-section p {
    color: white;
}

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

.contact-form input, .contact-form textarea {
    padding: 15px;
    border: 1px solid #444;
    border-radius: var(--border-radius);
    background-color: #2a3541; /* Slightly lighter dark background */
    color: white;
    font-size: 1em;
}

.contact-form textarea {
    resize: vertical;
}

.contact-form input::placeholder, .contact-form textarea::placeholder {
    color: #999;
}

.contact-form .cta-primary {
    width: 100%;
    margin: 10px 0 0;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 20px;
    background-color: #0b0c10;
    color: var(--text-light);
    font-size: 0.9em;
}

/* --- Responsive Adjustments --- */
@media (max-width: 900px) {
    .hero-content h1 {
        font-size: 2.5em;
    }
}

@media (max-width: 600px) {
    .navbar {
        flex-direction: column;
    }
    .nav-links {
        margin-top: 15px;
    }
    .hero-content h1 {
        font-size: 2em;
    }
    .tech-stack-section table, .tech-stack-section thead, .tech-stack-section tbody, .tech-stack-section th, .tech-stack-section td, .tech-stack-section tr {
        display: block;
    }
    .tech-stack-section thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    .tech-stack-section tr { border: 1px solid #ccc; margin-bottom: 10px; }
    .tech-stack-section td {
        border: none;
        position: relative;
        /* padding-left: 50%; */
        text-align: start;
    }
    .tech-stack-section td:before {
        content: attr(data-label);
        position: absolute;
        left: 6px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: bold;
        text-align: left;
    }
}
/* --- 5. Portfolio/Case Studies Section --- */
.portfolio-section {
    background-color: var(--background-light); /* Or white if the previous section was dark */
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.project-card {
    background-color: white;
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: left;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.project-title {
    color: var(--primary-dark);
    margin-bottom: 5px;
}

.project-focus {
    color: #666;
    margin-bottom: 20px;
    font-size: 1.05em;
    flex-grow: 1; /* Pushes the details and link to the bottom */
}

.project-details {
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-bottom: 20px;
    font-size: 0.95em;
}

.project-details p {
    margin: 5px 0;
}

.project-details strong {
    color: var(--primary-dark);
}

.project-link {
    width: 100%;
    text-align: center;
    padding: 10px 0;
    margin: 0;
}