/* CSS Variables for Theme */
:root {
    --primary-color: #0d0d2b; /* Deep indigo for background */
    --secondary-color: #2a2a57; /* Lighter indigo for accents */
    --accent-glow-start: #7f00ff; /* Neon violet */
    --accent-glow-end: #00e5ff;   /* Neon cyan */
    --text-color: #e0e0e0;
    --glass-bg: rgba(20, 20, 50, 0.3); /* Semi-transparent dark blue for glass effect */
    --glass-border: rgba(127, 0, 255, 0.5); /* Neon violet border for glass */
    --glow-shadow: 0 0 15px var(--accent-glow-start), 0 0 30px var(--accent-glow-end);
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--primary-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* For Safari */
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.crystal-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.crystal-nav .logo {
    font-size: 1.8rem;
    font-weight: bold;
    background: linear-gradient(90deg, var(--accent-glow-start), var(--accent-glow-end));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    /* text-shadow: var(--glow-shadow); */
    position: relative; /* Needed for the pseudo-element */
    overflow: hidden; /* Keep the sweep within the logo bounds */
    padding: 0.2em 0; /* Add some padding if text is too close to overflow hidden */
}

.crystal-nav .logo::after {
    content: '';
    position: absolute;
    top: -50%; /* Adjust to cover the text height */
    left: -100%;
    width: 40%; /* Width of the light sweep */
    height: 200%; /* Ensure it covers the text height */
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.5), /* White, semi-transparent light */
        transparent
    );
    transform: skewX(-25deg); /* Angled sweep */
    animation: lightSweep 3s infinite linear;
    animation-delay: 0.5s; /* Start animation after a short delay */
}

@keyframes lightSweep {
    0% {
        left: -100%;
    }
    20% { /* Hold briefly at the start */
        left: -100%;
    }
    80% { /* Sweep across */
        left: 100%;
    }
    100% {
        left: 100%;
    }
}

.crystal-nav ul {
    list-style: none;
    display: flex;
}

.crystal-nav ul li {
    margin-left: 2rem;
}

.crystal-nav ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background 0.3s ease, color 0.3s ease, text-shadow 0.3s ease;
}

.crystal-nav ul li a:hover {
    background: var(--accent-glow-start);
    color: #fff;
    text-shadow: 0 0 10px var(--accent-glow-end);
}

main {
    padding-top: 80px; /* Adjust based on header height */
}

section {
    padding: 4rem 2rem;
    min-height: 80vh; /* Make sections take up significant viewport height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* text-align: center; */ /* Allow content to define its alignment */
    position: relative; /* For particle effects and parallax */
}

section h2 {
    font-size: 2.5rem;
    margin-bottom: 2.5rem; /* Increased margin */
    background: linear-gradient(90deg, var(--accent-glow-start), var(--accent-glow-end));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: var(--glow-shadow);
    text-align: center; /* Ensure section titles are centered */
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    background: radial-gradient(circle, var(--secondary-color) 0%, var(--primary-color) 70%);
    position: relative;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: var(--glow-shadow);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.crystal-hero-object {
    width: 300px;
    height: 300px;
    margin: 2rem auto;
    /* Placeholder styling */
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    border-radius: 50%; /* Temporary shape */
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--glow-shadow);
}

/* About Section - Crystal Cards */
.about-section {
    background-color: var(--secondary-color);
    text-align: left; /* Align text to left for articles */
}

/* Content Styling for new structure */
.content-container {
    width: 100%;
    max-width: 960px; /* Limit content width for readability */
    margin: 0 auto;
    padding: 0 1rem; /* Add some padding on the sides */
}

.content-block {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2.5rem; /* Space between content blocks */
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    text-align: left;
}

.content-block h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--accent-glow-end);
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
}
.content-block h4 {
    font-size: 1.4rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--accent-glow-start);
}
.content-block h5 {
    font-size: 1.2rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.content-block p, .content-block li {
    margin-bottom: 0.75rem;
    color: var(--text-color);
    font-size: 0.95rem;
}

.content-block ul, .content-block ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.content-block strong {
    color: var(--accent-glow-end);
}

.content-block em { /* For quotes/messages */
    display: block;
    padding-left: 1rem;
    border-left: 3px solid var(--accent-glow-start);
    margin: 1rem 0;
    font-style: italic;
    color: #c0c0c0;
}

/* Table Styling */
.table-responsive {
    overflow-x: auto; /* Allows table to scroll horizontally on small screens */
    margin-top: 1rem;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
}

.styled-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(0,0,0,0.1); /* Darker background for table */
}

.styled-table th, .styled-table td {
    border: 1px solid var(--glass-border);
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.9rem;
}

.styled-table thead th {
    background-color: var(--accent-glow-start);
    color: #fff;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.styled-table tbody tr:nth-child(even) {
    background-color: rgba(255,255,255,0.03);
}

.styled-table tbody tr:hover {
    background-color: var(--accent-glow-end);
    color: var(--primary-color);
    cursor: default;
}
.styled-table td em { /* For placeholder text in tables */
    color: #aaa;
    font-style: italic;
    border-left: none;
    padding-left: 0;
}


/* Collapsible Content (for QA Plan) */
.collapsible-content summary {
    cursor: pointer;
    font-weight: bold;
    color: var(--accent-glow-end);
    padding: 0.5rem;
    border: 1px solid var(--glass-border);
    border-radius: 5px;
    background: rgba(255,255,255,0.05);
    margin-bottom: 0.5rem;
    display: block;
}
.collapsible-content summary:hover {
    background: var(--accent-glow-start);
    color: #fff;
}
.collapsible-content div {
    padding: 1rem;
    border: 1px dashed var(--glass-border);
    border-radius: 5px;
    margin-top: 0.5rem;
    background: rgba(0,0,0,0.1);
}


/* Services Section (reusing .features-section) */
.features-section { /* Now .services-section */
    text-align: left;
}

/* Projects Section (reusing .gallery-section) */
.gallery-section { /* Now .projects-section and .work-showcase-section */
    background-color: var(--secondary-color);
    text-align: left;
}
.gallery-carousel {
    width: 100%;
    max-width: 960px;
    margin: 2rem auto;
    text-align: center; /* Center placeholder text */
    color: var(--text-color);
}


/* Contact Section - Updated for new layout */
.contact-section {
    text-align: left;
}
.contact-details-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: space-between;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
}
.contact-info-block {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 2rem;
    flex: 1; /* Allows blocks to grow and fill space */
    min-width: 300px; /* Minimum width before wrapping */
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.contact-info-block h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-glow-end);
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
}
.contact-info-block p {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}
.contact-info-block a {
    color: var(--accent-glow-end);
    text-decoration: none;
}
.contact-info-block a:hover {
    text-decoration: underline;
    color: var(--accent-glow-start);
}


/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--primary-color);
    border-top: 1px solid var(--glass-border);
    margin-top: 2rem; /* Ensure space before footer */
}

/* Responsive Design Adjustments */
@media (max-width: 768px) {
    .crystal-nav {
        flex-direction: column;
        align-items: flex-start;
    }

    .crystal-nav ul {
        flex-direction: column;
        width: 100%;
        margin-top: 1rem;
    }

    .crystal-nav ul li {
        margin-left: 0;
        margin-bottom: 0.5rem;
        width: 100%;
    }

    .crystal-nav ul li a {
        display: block;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    section {
        padding: 3rem 1rem;
    }

    section h2 {
        font-size: 2rem;
    }

    .content-block {
        padding: 1.5rem;
    }
    .contact-details-container {
        flex-direction: column;
    }
    .contact-info-block {
        min-width: 100%; /* Full width on smaller screens */
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    .crystal-hero-object {
        width: 200px;
        height: 200px;
    }
    .content-block h3 {
        font-size: 1.5rem;
    }
    .content-block h4 {
        font-size: 1.2rem;
    }
}

/* Placeholder for animations - to be added with JS (GSAP) */
.animated-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* So it doesn't interfere with clicks */
    /* Particles will be generated by JS */
}