/* ── Custom properties ── */
:root {
    --accent: #6c5ce7;
    --accent-hover: #5649c0;
    --bg: #f2f1f7;
    --text-primary: #1a1a2e;
    --text-secondary: #555577;
}

/* ── Reset & base ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ── Portfolio sections ── */
.portfolio-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 2rem 2rem;
}

.portfolio-section + .portfolio-section {
    margin-top: 1rem;
    padding-top: 4rem;
    border-top: 1px solid #e0dff0;
}

/* ── Section header ── */
.section-header {
    margin-bottom: 2.5rem;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.75rem);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.section-accent-line {
    width: 56px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 620px;
    line-height: 1.7;
}

/* ── Blazor error UI (keep intact) ── */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

/* ── Loading spinner ── */
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: var(--accent);
    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: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text::after {
    content: var(--blazor-load-percentage-text, "Loading");
}

@media (max-width: 768px) {
    .portfolio-section {
        padding: 3.5rem 1.25rem 1.5rem;
    }
}
