/* --- Global Styles & Variables --- */
:root {
    --bg-dark: #0a0f18;
    --bg-light: #151c2c;
    --primary-accent: #9333ea; /* Purple-600 */
    --secondary-accent: #a855f7; /* Purple-500 */
    --text-light: #e2e8f0; /* Slate-200 */
    --text-dark: #94a3b8; /* Slate-400 */
    --border-color: #334155; /* Slate-700 */
    --font-family: 'Poppins', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

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

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

h1, h2, h3 {
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 600;
}

h1 {
    font-size: 3rem;
    color: #fff;
}

h2 {
    font-size: 2.5rem;
    color: var(--secondary-accent);
    text-align: center;
    margin-bottom: 3rem;
}

p {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

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

a:hover {
    color: var(--text-light);
}

/* --- Header & Logo --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(10, 15, 24, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
}

.logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    margin-left: 0.75rem;
    color: var(--text-light);
}

/* --- Hamburger Menu --- */
.hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 2rem;
    height: 2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-menu span {
    width: 2rem;
    height: 0.2rem;
    background: var(--text-light);
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

.hamburger-menu.is-active span:nth-child(1) {
    transform: rotate(45deg);
}

.hamburger-menu.is-active span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.hamburger-menu.is-active span:nth-child(3) {
    transform: rotate(-45deg);
}

/* --- Navigation Overlay --- */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 15, 24, 0.98);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 999;
}

.nav-overlay.is-open {
    transform: translateX(0);
}

.nav-overlay ul {
    list-style: none;
    text-align: center;
}

.nav-overlay ul li {
    margin: 2rem 0;
}

.nav-overlay ul li a {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* --- Sections --- */
.section {
    padding: 6rem 0;
}

.section-alt {
    background-color: var(--bg-light);
}

.hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100vh;
    padding-top: 60px; /* Header height */
    position: relative;
    overflow: hidden; /* Ensures the graphic doesn't spill out */
}

.hero-arch-banner {
    width: 100%;
    max-width: 400px;
    margin: 0 auto 2rem;
}

.arch-diagram {
    width: 100%;
    height: auto;
}

.arch-diagram .control-plane rect,
.arch-diagram .worker-node rect {
    fill: rgba(147, 51, 234, 0.1); /* primary-accent with low opacity */
    stroke: var(--secondary-accent);
    stroke-width: 0.5;
}

.arch-diagram text {
    font-family: var(--font-family);
    font-size: 6px;
    fill: var(--text-dark);
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.arch-diagram .pod {
    fill: var(--secondary-accent);
    animation: pulse-pod 3s infinite alternate ease-in-out;
}

.arch-diagram .pod:nth-of-type(2) { animation-delay: 0.5s; }
.arch-diagram .pod:nth-of-type(3) { animation-delay: 1s; }

@keyframes pulse-pod {
    from { opacity: 0.6; }
    to { opacity: 1; }
}

.arch-diagram .connectors path {
    stroke: var(--border-color);
    stroke-width: 0.5;
    fill: none;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: draw-line 2s ease-out forwards;
}

/* Stagger the line drawing animation */
.arch-diagram .connectors path:nth-child(1) { animation-delay: 0s; }
.arch-diagram .connectors path:nth-child(2) { animation-delay: 0.5s; }
.arch-diagram .connectors path:nth-child(3) { animation-delay: 1s; }
.arch-diagram .connectors path:nth-child(4) { animation-delay: 1s; }
.arch-diagram .connectors path:nth-child(5) { animation-delay: 1s; }

@keyframes draw-line { to { stroke-dashoffset: 0; } }

.hero-graphic {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 15% 25%, var(--primary-accent), transparent 25%),
        radial-gradient(circle at 85% 75%, var(--secondary-accent), transparent 25%);
    background-size: 150% 150%;
    opacity: 0.15;
    filter: blur(70px); /* Creates the soft, nebulous look */
    animation: move-glow 15s linear infinite alternate;
    z-index: 0; /* Places it behind the content */
}

@keyframes move-glow {
    from { transform: translate(-10%, -10%); }
    to { transform: translate(10%, 10%); }
}

.hero-section .container {
    position: relative; /* Required to respect the z-index */
    z-index: 1; /* Ensures text and buttons are on top of the graphic */
}

.hero-section .subtitle {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 1rem auto 2rem;
}

.cta-button {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--primary-accent);
    color: #fff;
    border-radius: 5px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.cta-button:hover {
    background: var(--secondary-accent);
    color: #fff;
}

/* --- About Section --- */
.about-content {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.about-logo {
    flex-shrink: 0;
}

.about-text p {
    margin-bottom: 0; /* Remove default bottom margin */
}


/* --- Cards for Services & Projects --- */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--bg-light);
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.section-alt .card {
    background: var(--bg-dark);
    border-color: #475569; /* Slate-600 */
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.card h3 {
    color: var(--secondary-accent);
    font-size: 1.5rem;
}

.card p {
    flex-grow: 1; /* Pushes the button to the bottom if cards have different text lengths */
}

.card .cta-button {
    margin-top: 1.5rem;
    text-align: center;
}

/* --- Tech Stack Section --- */
.tech-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 2rem 3rem;
    margin-top: 4rem;
}

.tech-logo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
    width: 120px;
    transition: transform 0.3s ease;
}

.tech-logo-item svg {
    width: 64px;
    height: 64px;
    fill: var(--text-dark);
    transition: fill 0.3s ease;
}

.tech-logo-item span {
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 400;
    transition: color 0.3s ease;
}

.tech-logo-item:hover svg, .tech-logo-item:hover span {
    fill: var(--secondary-accent);
    color: var(--secondary-accent);
}

/* --- Clients Section / Testimonials --- */
.testimonial-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 4rem;
}

.testimonial-card {
    background: var(--bg-dark);
    padding: 2.5rem 2rem;
    border-left: 4px solid var(--primary-accent);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
    flex-basis: 300px;
}

.testimonial-card blockquote {
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    position: relative;
    padding-left: 2rem;
}

.testimonial-card blockquote::before {
    content: '“';
    font-family: Georgia, serif;
    font-size: 4rem;
    color: var(--primary-accent);
    opacity: 0.5;
    position: absolute;
    left: -0.5rem;
    top: -1.5rem;
}

.testimonial-card cite {
    font-style: normal;
    text-align: right;
    color: var(--text-dark);
}

.testimonial-card .client-name {
    display: block;
    font-weight: 600;
    color: var(--text-light);
}

/* --- Contact Section --- */
#contact .card-container {
    margin-top: 4rem;
}

/* --- Blog Section & Modal --- */
.post-meta {
    font-size: 0.8rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.card .read-more-btn {
    border: none;
    cursor: pointer;
    font-family: var(--font-family);
    width: 100%;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 15, 24, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-light);
    padding: 2rem 3rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay.is-visible .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--text-light);
}

.post-content h1, .post-content h2, .post-content h3 {
    color: var(--secondary-accent);
    margin-top: 1.5rem;
}

.post-content p {
    color: var(--text-light);
}

.post-content pre {
    background: var(--bg-dark);
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
    overflow-x: auto;
    border: 1px solid var(--border-color);
}

/* --- Footer --- */
.footer {
    text-align: center;
    padding: 2rem;
    background: var(--bg-dark);
    color: var(--text-dark);
    font-size: 0.9rem;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    .nav-overlay ul li a { font-size: 1.5rem; }

    .about-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
}