/* Modern Technical Color Scheme - Light Neutral Greens with Earth Tones */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400&display=swap');

:root {
    /* Neutral Green Base Colors */
    --primary-bg: #f5f7f4;          /* Soft off-white with subtle green tint */
    --secondary-bg: #e8ede6;        /* Light sage background */
    --accent-bg: #d4dfd0;           /* Muted sage for cards/sections */
    
    /* Text Colors - Updated for WCAG AA Compliance */
    --primary-text: #1a2419;        /* Darker forest green for main text (7.5:1 contrast) */
    --secondary-text: #3d4d3a;      /* Darker green for secondary text (5.5:1 contrast) */
    --tertiary-text: #5a6c56;       /* Medium green for subtle text (4.5:1 contrast) */
    
    /* Accent Colors - Warm Earth Tones for Contrast */
    --accent-color: #a65d25;        /* Darker terracotta for better contrast (4.5:1) */
    --accent-hover: #c17c3f;        /* Medium terracotta for hover */
    --accent-secondary: #6b4f2e;    /* Darker warm brown for secondary elements */
    
    /* Interactive Colors */
    --success-color: #4d6e46;       /* Darker olive green for success states (4.5:1) */
    --error-color: #a83838;         /* Darker coral-red for errors (4.5:1) */
    --warning-color: #9d7328;       /* Darker amber/gold for warnings (4.5:1) */
    
    /* Borders and Dividers */
    --border-color: #c4d3bf;        /* Soft sage border */
    --border-accent: #a8bca3;       /* Slightly darker for emphasis */
    
    /* Font Family - Monospaced Technical Theme */
    --font-family: 'JetBrains Mono', 'Courier New', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: var(--font-family);
    background-color: var(--primary-bg);
    color: var(--primary-text);
    height: 100%;
    width: 100%;
}

#app {
    height: 100%;
    width: 100%;
}

/* Image optimization */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Lazy loading hint */
img[loading="lazy"] {
    content-visibility: auto;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-text);
    letter-spacing: -0.02em;
}

h1 {
    font-size: 3rem;
    line-height: 1.2;
    font-weight: 800;
}

h2 {
    font-size: 2rem;
    font-weight: 700;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

p {
    line-height: 1.6;
    margin-bottom: 1rem;
    font-weight: 400;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

a:hover {
    color: var(--accent-hover);
}

/* Layout */
.page-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background-color: var(--secondary-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-text);
    letter-spacing: -0.03em;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    font-size: 1rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    color: var(--primary-text);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-links a:hover {
    background-color: var(--accent-bg);
    color: var(--accent-color);
}

.main-content {
    flex: 1;
    width: 100%;
}

/* Splash Page */
.splash-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px);
    padding: 2rem;
    text-align: center;
}

.profile-section {
    max-width: 800px;
    margin: 0 auto;
}

.profile-title {
    font-size: 4rem;
    margin-bottom: 1rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.03em;
}

.profile-subtitle {
    font-size: 1.5rem;
    color: var(--secondary-text);
    margin-bottom: 2rem;
    font-weight: 500;
}

.profile-description {
    font-size: 1.1rem;
    color: var(--secondary-text);
    line-height: 1.8;
    margin-bottom: 3rem;
    font-weight: 400;
}

.skills-section {
    margin-top: 3rem;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    list-style: none;
}

.skill-tag {
    background-color: var(--accent-bg);
    color: var(--primary-text);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

/* Call to Action Buttons */
.cta-section {
    margin-top: 2rem;
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-button {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    letter-spacing: 0.01em;
    border: 2px solid transparent;
}

.cta-button.primary {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.cta-button.primary:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(193, 124, 63, 0.3);
}

.cta-button.secondary {
    background-color: transparent;
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.cta-button.secondary:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-2px);
}

.cta-button.large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* Services Section */
.services-section {
    background-color: var(--secondary-bg);
    padding: 5rem 2rem;
    border-top: 1px solid var(--border-color);
}

.services-container {
    max-width: 1200px;
    margin: 0 auto;
}

.services-container h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-text);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.service-card {
    background-color: var(--primary-bg);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(45, 62, 43, 0.15);
    border-color: var(--border-accent);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-icon img {
    width: 3rem;
    height: 3rem;
    filter: brightness(0) saturate(100%) invert(34%) sepia(12%) saturate(1166%) hue-rotate(64deg) brightness(95%) contrast(87%);
}

.service-card:hover .service-icon img {
    filter: brightness(0) saturate(100%) invert(47%) sepia(35%) saturate(819%) hue-rotate(350deg) brightness(93%) contrast(86%);
    transition: filter 0.3s ease;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-text);
}

.service-card p {
    color: var(--secondary-text);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.service-features {
    list-style: none;
    padding: 0;
}

.service-features li {
    padding: 0.5rem 0;
    color: var(--secondary-text);
    font-size: 0.95rem;
    position: relative;
    padding-left: 1.5rem;
}

.service-features li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: 700;
}

/* Tech Stack Section */
.tech-stack-section {
    padding: 5rem 2rem;
    background-color: var(--primary-bg);
}

.tech-stack-container {
    max-width: 1200px;
    margin: 0 auto;
}

.tech-stack-container h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-text);
}

.section-description {
    text-align: center;
    color: var(--secondary-text);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.tech-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.tech-category {
    background-color: var(--secondary-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.tech-category h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tech-tag {
    background-color: var(--accent-bg);
    color: var(--primary-text);
    padding: 0.4rem 0.9rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.tech-tag:hover {
    border-color: var(--accent-color);
    background-color: var(--primary-bg);
}

/* Why Choose Section */
.why-choose-section {
    background-color: var(--secondary-bg);
    padding: 5rem 2rem;
    border-top: 1px solid var(--border-color);
}

.why-choose-container {
    max-width: 1200px;
    margin: 0 auto;
}

.why-choose-container h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-text);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.benefit-item {
    text-align: center;
    padding: 1.5rem;
}

.benefit-item h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary-text);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.benefit-item h3 img {
    width: 1.5rem;
    height: 1.5rem;
    filter: brightness(0) saturate(100%) invert(47%) sepia(35%) saturate(819%) hue-rotate(350deg) brightness(93%) contrast(86%);
}

.benefit-item p {
    color: var(--secondary-text);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* Final CTA Section */
.final-cta-section {
    background: linear-gradient(135deg, var(--accent-bg), var(--secondary-bg));
    padding: 5rem 2rem;
    border-top: 1px solid var(--border-color);
}

.final-cta-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.final-cta-container h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-text);
}

.final-cta-description {
    font-size: 1.1rem;
    color: var(--secondary-text);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}


/* Forms */
.form-container {
    max-width: 600px;
    margin: 4rem auto;
    padding: 2rem;
    background-color: var(--secondary-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.form-title {
    margin-bottom: 2rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-text);
    font-weight: 600;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--accent-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--primary-text);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-button {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease;
    letter-spacing: 0.01em;
}

.form-button:hover {
    background-color: var(--accent-hover);
}

.form-button:disabled {
    background-color: var(--border-color);
    cursor: not-allowed;
}

/* Validation */
.validation-message {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-input.invalid,
.form-textarea.invalid {
    border-color: var(--error-color);
}

.form-input.valid,
.form-textarea.valid {
    border-color: var(--success-color);
}

/* Messages */
.success-message {
    background-color: rgba(82, 196, 26, 0.1);
    border: 1px solid var(--success-color);
    color: var(--success-color);
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    text-align: center;
}

.info-message {
    background-color: rgba(74, 158, 255, 0.1);
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    text-align: center;
}

.error-message {
    background-color: rgba(255, 77, 79, 0.1);
    border: 1px solid var(--error-color);
    color: var(--error-color);
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Download Section */
.download-section {
    text-align: center;
    padding: 4rem 2rem;
}

.download-button {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--accent-color);
    color: white;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    letter-spacing: 0.01em;
}

.download-button:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.download-button.disabled {
    background-color: var(--border-color);
    cursor: not-allowed;
    pointer-events: none;
}

/* Loading */
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: var(--accent-color);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: 600;
    color: var(--primary-text);
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

/* Error UI */
#blazor-error-ui {
    background: var(--error-color);
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    color: white;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: var(--error-color);
    padding: 1rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

/* Responsive */
@media (max-width: 768px) {
    .profile-title {
        font-size: 2.5rem;
    }
    
    .profile-subtitle {
        font-size: 1.2rem;
    }
    
    .header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .form-container {
        padding: 1.5rem;
        margin: 2rem 1rem;
    }
    
    .services-section,
    .tech-stack-section,
    .why-choose-section,
    .final-cta-section {
        padding: 3rem 1.5rem;
    }
    
    .services-container h2,
    .tech-stack-container h2,
    .why-choose-container h2,
    .final-cta-container h2 {
        font-size: 2rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .tech-categories {
        grid-template-columns: 1fr;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-section,
    .cta-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .cta-button {
        width: 100%;
        text-align: center;
    }
    
    .splash-container {
        min-height: auto;
        padding: 3rem 1.5rem;
    }
}