:root {
    --primary: #002a79;
    --secondary: #475569;
    --dark: #0f172a;
    --light: #f8fafc;
    --accent: #004d80;
    --success: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
    background-color: #f5f5f0;
    color: var(--dark);
    line-height: 1.6;
    position: relative;
}

/* Full-page spirograph background */
#spirograph-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

#spirograph-background svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Spirograph controls bar */
#spirograph-controls-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--primary);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.25rem 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.toggle-controls-btn {
    background: transparent;
    color: white;
    border: none;
    padding: 0.25rem 0;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 400;
    transition: opacity 0.2s ease;
    margin: 0;
}

.toggle-controls-btn:hover {
    opacity: 0.8;
}

.controls-bar-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.slider-container-compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.slider-container-compact label {
    font-size: 0.8rem;
    white-space: nowrap;
    color: white;
    font-weight: 500;
}

.slider-container-compact input[type="range"] {
    width: 80px;
}

.action-bar-group.action-sliders {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 10;
    width: 100%;
    box-sizing: border-box;
}

/* Make sections have semi-transparent backgrounds */
header,
section,
footer {
    position: relative;
    z-index: 10;
}

header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
}

.hero .container,
.about-section .container {
    background: rgba(248, 250, 252, 0.5);
    backdrop-filter: blur(0.5px);
    border-radius: 1.5rem;
    padding: 2rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
    transition: opacity 0.3s ease;
}

footer {
    background: rgba(248, 250, 252, 0.5);
    backdrop-filter: blur(2.5px);
    transition: opacity 0.3s ease;
}

header {
    padding: 2rem 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-logo:hover {
    color: var(--accent);
}

nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

nav a {
    color: var(--dark);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

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

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

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

.hero {
    padding: 2rem 0 2rem;
}

.hero-container {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 2rem;
    justify-content: space-between;
}

.hero-content {
    flex: 2;
    min-width: 300px;
    max-width: 60%; /* Adjusted from 60% for better balance with projects, or make hero-projects take less space */
}

.hero-projects {
    flex: 1;
    min-width: 300px; /* Ensure it doesn't get too small */
    max-width: 380px; /* Max width for the project column */
    margin-left: auto; /* Pushes to the right if hero-content is narrower */
}

h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--secondary);
    margin-bottom: 2rem;
}

.about {
    font-size: 1.125rem;
    color: var(--secondary);
    margin-bottom: 2.5rem;
    max-width: 650px;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-right: 1rem;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

/* Projects section - can be used for a dedicated projects page or general section styling */
.projects {
    padding: 4rem 0;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    width: 60px;
    height: 3px;
    background: var(--primary);
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

/* Styling for project cards (used in hero and potentially elsewhere) */
.project-grid, .projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.project-card {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(2.5px);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    max-width: 100%; /* Ensure cards don't overflow their container */
}

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

.project-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: var(--secondary); /* Placeholder background */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.project-content {
    padding: 1.5rem;
}

.project-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.project-desc {
    color: var(--secondary);
    margin-bottom: 1.5rem;
}

.project-link {
    display: inline-block;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: transform 0.3s ease;
}

.project-link:hover {
    transform: translateX(5px);
}

footer {
    background-color: var(--dark);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.social-links {
    margin-top: 1.5rem;
}

.social-links a {
    display: inline-block;
    color: white;
    margin: 0 0.5rem;
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-3px);
}

/* CSS for Blog Snippets in Hero Section */
.hero-blog-snippets {
    margin-top: 2.5rem;
}

.hero-blog-snippets .section-subtitle { /* Using a slightly different class for subtitle */
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
    font-weight: 500; /* Make it a bit bolder */
}

.blog-snippet-card {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(2.5px);
    border: 1px solid rgba(226, 232, 240, 0.5); /* Softer border */
    border-radius: 0.375rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem; /* Spacing between cards */
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    transition: opacity 0.3s ease;
}

.blog-snippet-card:last-child {
    margin-bottom: 0;
}

.blog-snippet-title {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.blog-snippet-excerpt {
    font-size: 0.95rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}
/* End of CSS for Blog Snippets */

/* Animation for page load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Apply animation to hero content and project cards */
.hero-content, .project-card, .blog-snippet-card {
    animation: fadeInUp 0.8s ease forwards;
}

/* Stagger animation for project cards/blog snippets if needed */
.project-card:nth-child(2), .blog-snippet-card:nth-child(2) {
    animation-delay: 0.2s;
}

.project-card:nth-child(3), .blog-snippet-card:nth-child(3) { /* Assuming max 3 items with staggered animation */
    animation-delay: 0.4s;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
        max-width: 100%;
    }
    
    header .container {
        padding: 0 1rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    .hero-container {
        flex-direction: column;
    }
    
    .hero-content, .hero-projects {
        max-width: 100%;
        margin-left: 0; /* Reset margin for stacked layout */
    }
}

/* Additional styles for a dedicated blog page or post pages would go below */
/* .blog-post-container { padding: 4rem 0; } */
/* .blog-post-content { max-width: 800px; margin: 0 auto; background: white; padding: 2rem; border-radius: 0.5rem; box-shadow: 0 4px 12px rgba(0,0,0,0.1); } */
/* .blog-post-content h1 { font-size: 2.2rem; margin-bottom: 1rem; } */
/* .blog-post-content .post-meta { font-size: 0.9rem; color: var(--secondary); margin-bottom: 2rem; } */
/* .blog-post-content p { margin-bottom: 1rem; line-height: 1.7; } */

/* Chaosgraph Styling */
.chaosgraph-container {
    margin: 3rem 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: transparent;
    border-radius: 0;
    padding: 0;
    margin-bottom: 1.5rem;
    box-shadow: none;
    flex-wrap: wrap;
    border: none;
    gap: 1rem;
}

.action-bar-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.action-bar label {
    display: inline-block;
    margin-right: 0.5rem;
    font-weight: 500;
    color: var(--secondary);
}

.action-bar select {
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    border: 1px solid #e2e8f0;
    background-color: white;
    color: var(--dark);
    vertical-align: middle;
}

.controls {
    background-color: transparent;
    border-radius: 0;
    padding: 0;
    margin-bottom: 2rem;
    box-shadow: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    border: none;
}

.slider-container {
    display: flex;
    flex-direction: column;
}

.controls label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--secondary);
    font-size: 0.875rem;
}

.controls .toggle-container-inline label {
    display: inline-block;
    margin-left: 0.25rem;
    font-weight: 500;
}

.controls input[type="checkbox"] {
    vertical-align: middle;
    margin-right: 0.25rem;
}

input[type="range"] {
    width: 100%;
    -webkit-appearance: none;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    outline: none;
    transition: all 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--accent);
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.4);
}

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

input[type="range"]::-moz-range-thumb:hover {
    background: var(--accent);
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.4);
}

#spirograph-container {
    background-color: transparent;
    border-radius: 0;
    padding: 0 40px 0 0;
    box-shadow: none;
    text-align: center;
    position: relative;
    border: none;
    overflow: hidden;
}

svg#spirograph {
    background-color: transparent;
    border-radius: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    box-shadow: none;
}

.action-button {
    padding: 0.375rem 0.75rem;
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--dark);
    transition: all 0.3s ease;
    vertical-align: middle;
}

.action-button:hover {
    background-color: #f8fafc;
    border-color: var(--primary);
    transform: translateY(-1px);
}

.random-btn {
    background: linear-gradient(to right, var(--primary), var(--accent));
    color: white;
    border: none;
}

.random-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.toggle-container-inline {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.toggle-container-inline label {
    display: inline-block;
    margin-left: 5px;
    font-weight: 500;
    color: var(--secondary);
}

.toggle-container-inline input[type="checkbox"] {
    vertical-align: middle;
}

.slider-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.slider-steppers {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.slider-btn {
    background: linear-gradient(145deg, var(--primary), #1e40af);
    color: white;
    border: none;
    padding: 0.15rem 0.3rem;
    border-radius: 0.2rem;
    cursor: pointer;
    font-size: 0.7rem;
    line-height: 1;
    width: 18px;
    height: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
}

.slider-btn:hover {
    background: linear-gradient(145deg, var(--accent), var(--primary));
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
}

.slider-wrapper input[type="range"] {
    flex-grow: 1;
    width: auto;
}

/* Ensure toggle labels in action bar are styled correctly */
.action-bar .toggle-container-inline label {
    margin-left: 0.25rem;
    margin-right: 0;
    font-weight: 500;
    color: var(--secondary);
}

@media (max-width: 768px) {
    .controls {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .action-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .action-bar-group {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .controls {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .chaosgraph-container {
        margin: 2rem 0;
    }
}
/* End Chaosgraph Styling */


 