:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --accent-color: #0ea5e9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-light: #64748b;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-accent: #f1f5f9;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --border-radius: 0.5rem;
    --border-radius-lg: 1rem;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem; /* Offset for fixed navbar when scrolling to anchors */
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-brand .logo {
    height: 2.5rem;
    width: auto;
    object-fit: contain;
    border-radius: 0.25rem;
}

.nav-brand .brand-text {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(37, 99, 235, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(14, 165, 233, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-container {
    max-width: 800px;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.4s both;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background-color: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Sections */
.section {
    padding: 6rem 0 5rem 0; /* Increased top padding to account for fixed navbar */
    position: relative;
}

/* First section after hero needs extra spacing */
.section:first-of-type:not(.hero) {
    padding-top: 8rem;
}

.section-alt {
    background-color: var(--bg-secondary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-description {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-center {
    text-align: center;
    margin-top: 2rem;
}

.section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* Cards */
.card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.card-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.card-link:hover {
    color: var(--accent-color);
    transform: translateX(4px);
}

/* Gallery Preview */
.gallery-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.gallery-item {
    aspect-ratio: 1;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.gallery-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 500;
    text-align: center;
    transition: var(--transition);
}

.gallery-placeholder span {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.gallery-placeholder p {
    font-size: 1rem;
    margin: 0;
}

.gallery-item:hover .gallery-placeholder {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
}

/* Contact Form */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
    margin-top: 3rem;
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
}

.contact-icon {
    font-size: 1.25rem;
    width: 2rem;
    text-align: center;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-primary);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background-color: var(--text-primary);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1rem;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    .nav-links {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .gallery-preview {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .section-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    .hero-container {
        padding: 0 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .gallery-preview {
        grid-template-columns: 1fr 1fr;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* Selection Styling */
::selection {
    background: rgba(37, 99, 235, 0.2);
    color: var(--text-primary);
}

/* Focus Styles for Accessibility */
.btn:focus,
.nav-link:focus,
.card-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* About Section Styles */
.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
    margin-top: 2rem;
}

.about-text h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    margin-top: 2rem;
    font-size: 1.25rem;
}

.about-text h3:first-child {
    margin-top: 0;
}

.about-text p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.about-stats {
    display: grid;
    gap: 1.5rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Featured Projects Styles */
.featured-projects {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-top: 2rem;
}

.featured-project {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    align-items: center;
    padding: 2rem;
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.featured-project:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.project-image {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.project-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.project-placeholder span {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.project-placeholder h4 {
    font-size: 1.1rem;
    margin: 0;
}

.project-info h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.project-info p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.project-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.feature-tag {
    background: var(--bg-accent);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

.project-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.project-link:hover {
    color: var(--accent-color);
    transform: translateX(4px);
}

/* Responsive Design Updates */
@media (max-width: 768px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .featured-project {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    .project-image {
        max-width: 250px;
        justify-self: center;
    }
}

/* Additional Styles for Section Pages */

/* Tech Stack Tags */
.tech-stack,
.equipment-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tech-tag,
.equipment-item {
    background: var(--bg-accent);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

/* Skills Section */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.skill-category h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-item {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.skill-item:hover {
    background: var(--accent-color);
    transform: scale(1.05);
}

/* Photography Gallery */
.gallery-categories {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.category-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-secondary);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.category-btn:hover,
.category-btn.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.photo-item {
    aspect-ratio: 4/3;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

.photo-item .photo-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: 1rem;
    transition: var(--transition);
}

.photo-item .photo-placeholder span {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.photo-item .photo-placeholder h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.photo-item .photo-placeholder p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.photo-item:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

/* Philosophy Section */
.philosophy-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.philosophy-text h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.philosophy-text h3:first-child {
    margin-top: 0;
}

.philosophy-text p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.philosophy-stats {
    display: grid;
    gap: 1.5rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Electronics Specific Styles */
.design-specs {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-accent);
    border-radius: var(--border-radius);
}

.spec-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.spec-item:last-child {
    margin-bottom: 0;
}

.spec-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.spec-value {
    color: var(--text-primary);
    font-weight: 600;
}

/* Tools Section */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.tool-category h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.tool-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tool-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.tool-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.tool-icon {
    font-size: 2rem;
    min-width: 3rem;
    text-align: center;
}

.tool-info h4 {
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.tool-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

/* Methodology Steps */
.methodology-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.step:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.step-number {
    width: 3rem;
    height: 3rem;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.step-content h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.step-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .philosophy-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .methodology-steps {
        grid-template-columns: 1fr;
    }
    
    .photo-gallery {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .skills-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .gallery-categories {
        flex-direction: column;
        align-items: center;
    }
    
    .category-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
    }
    
    .step-number {
        align-self: center;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer {
        display: none;
    }
    
    .section {
        padding: 1rem 0;
    }
    
    .hero {
        min-height: auto;
        padding: 2rem 0;
    }
}

/* Code Snippets Styles */
.snippets-container {
    display: grid;
    gap: 3rem;
    margin-top: 3rem;
}

.snippet-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.snippet-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.snippet-header {
    padding: 2rem 2rem 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.snippet-header h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.snippet-header p {
    margin: 0;
    color: #6c757d;
    font-size: 0.95rem;
}

.code-container {
    position: relative;
    background: #2d3748;
    overflow-x: auto;
}

/* Override Prism theme colors for better readability */
.code-container pre[class*="language-"] {
    margin: 0;
    padding: 2rem;
    background: #2d3748 !important;
    color: #e2e8f0 !important;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    border-radius: 0;
}

.code-container code[class*="language-"] {
    color: #e2e8f0 !important;
    background: none !important;
    text-shadow: none !important;
}

/* Syntax highlighting colors */
.token.comment { color: #718096 !important; }
.token.keyword { color: #ed8936 !important; font-weight: bold; }
.token.string { color: #48bb78 !important; }
.token.number { color: #4299e1 !important; }
.token.function { color: #9f7aea !important; }
.token.class-name { color: #ed8936 !important; }
.token.operator { color: #f56565 !important; }
.token.punctuation { color: #a0aec0 !important; }
.token.preprocessor { color: #38b2ac !important; }

/* Line numbers styling */
.line-numbers .line-numbers-rows {
    border-right: 1px solid #4a5568 !important;
    background: #1a202c !important;
    padding-right: 1rem !important;
}

.line-numbers-rows > span:before {
    color: #718096 !important;
}

/* Language indicator */
.code-language {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.3);
    color: #e2e8f0;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Copy button styling */
.copy-to-clipboard-button {
    position: absolute !important;
    top: 0.75rem !important;
    right: 4rem !important;
    background: rgba(0, 0, 0, 0.3) !important;
    color: #e2e8f0 !important;
    border: none !important;
    padding: 0.25rem 0.75rem !important;
    border-radius: 4px !important;
    font-size: 0.75rem !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease !important;
}

.copy-to-clipboard-button:hover {
    background: rgba(0, 0, 0, 0.5) !important;
}

/* Loading and error states for code snippets */
.code-container code:empty::before {
    content: "Loading code...";
    color: #718096;
    font-style: italic;
}

.code-container code.error {
    color: #f56565 !important;
}

.code-container code.error::before {
    content: "";
}

/* File source indicator */
.code-container::after {
    content: attr(data-file);
    position: absolute;
    bottom: 0.75rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.3);
    color: #a0aec0;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-family: monospace;
}

/* Code Examples Navigation */
.code-examples-nav {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow);
}

.code-examples-nav h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

.examples-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.75rem;
    max-width: 900px;
    margin: 0 auto;
}

.example-link {
    display: block;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.example-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-color);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.example-link:hover {
    background: var(--bg-primary);
    border-color: var(--primary-color);
    transform: translateX(0.25rem);
    box-shadow: var(--shadow);
}

.example-link:hover::before {
    transform: scaleY(1);
}

.example-link:active {
    transform: translateX(0.125rem);
}

/* Responsive design for code snippets */
@media (max-width: 768px) {
    .code-examples-nav {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .examples-list {
        gap: 0.5rem;
    }
    
    .example-link {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .snippet-card {
        margin: 0 -1rem;
        border-radius: 0;
    }
    
    .snippet-header {
        padding: 1.5rem 1rem 1rem;
    }
    
    .code-container pre[class*="language-"] {
        padding: 1.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .code-language,
    .copy-to-clipboard-button {
        font-size: 0.7rem !important;
        padding: 0.2rem 0.5rem !important;
    }
}

/* GitHub Projects Section */
.github-profile {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.github-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
    padding: 2.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 1px solid var(--border-color);
    align-items: center;
}

.github-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-placeholder {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow);
}

.github-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.github-info p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.github-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.github-stats .stat {
    background: var(--bg-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.github-links .btn {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.github-repositories {
    padding: 2.5rem;
}

.github-repositories h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.repo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.repo-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: var(--transition);
    position: relative;
}

.repo-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.repo-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.repo-header h5 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.repo-language {
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.repo-language.cpp {
    background: #00599c;
    color: white;
}

.repo-language.c {
    background: #555555;
    color: white;
}

.repo-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.repo-topics {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.topic {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    color: var(--text-light);
    transition: var(--transition);
}

.topic:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.repo-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: auto;
}

.github-cta {
    text-align: center;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    margin-top: 1rem;
}

.github-cta p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Responsive design for GitHub section */
@media (max-width: 768px) {
    .github-header {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
        padding: 2rem;
    }
    
    .github-repositories {
        padding: 2rem;
    }
    
    .repo-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .repo-card {
        padding: 1.25rem;
    }
    
    .github-stats {
        justify-content: center;
    }
}