:root {
    color-scheme: light;
    --ink: #17202d;
    --muted: #5f6d7d;
    --line: #d8e1e7;
    --panel: #f3f7f8;
    --teal: #1f6f78;
    --teal-dark: #14535b;
    --green: #5f8b65;
    --gold: #b9813c;
    --white: #ffffff;
    --shadow: 0 18px 55px rgba(23, 32, 45, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        linear-gradient(180deg, rgba(238, 247, 248, 0.85), rgba(255, 255, 255, 0) 420px),
        #ffffff;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(31, 111, 120, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(31, 111, 120, 0.055) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: linear-gradient(to bottom, black, transparent 70%);
}

a {
    color: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.profile-page {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 22px;
    align-items: center;
    padding: 18px 0;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(216, 225, 231, 0.78);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-size: 0.98rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: white;
    background: var(--teal);
    font-size: 0.82rem;
    letter-spacing: 0;
}

.main-nav {
    display: flex;
    justify-content: center;
    gap: 22px;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 650;
}

.main-nav a {
    text-decoration: none;
}

.main-nav a:hover {
    color: var(--teal);
}

.language-switch {
    display: inline-flex;
    border: 1px solid var(--line);
    background: var(--white);
}

.language-switch button {
    min-width: 38px;
    border: 0;
    border-right: 1px solid var(--line);
    padding: 8px 10px;
    color: var(--muted);
    background: transparent;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
}

.language-switch button:last-child {
    border-right: 0;
}

.language-switch button.active {
    color: var(--white);
    background: var(--teal);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(380px, 0.78fr);
    gap: 46px;
    align-items: center;
    min-height: calc(100vh - 72px);
    padding: 62px 0 74px;
}

.hero > * {
    min-width: 0;
}

.eyebrow,
.section-kicker {
    margin: 0 0 12px;
    color: var(--teal);
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    overflow-wrap: anywhere;
}

h1:focus {
    outline: none;
}

h1 {
    max-width: 830px;
    margin: 0;
    color: var(--ink);
    font-size: clamp(2.45rem, 5.1vw, 4.55rem);
    line-height: 1;
    letter-spacing: 0;
    word-break: break-word;
}

.hero-lead {
    max-width: 720px;
    margin: 26px 0 0;
    color: var(--muted);
    font-size: clamp(1rem, 1.35vw, 1.22rem);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    padding: 11px 18px;
    color: var(--ink);
    background: var(--white);
    font-weight: 800;
    text-decoration: none;
}

.button.primary {
    border-color: var(--teal);
    color: var(--white);
    background: var(--teal);
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(23, 32, 45, 0.1);
}

.signal-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 30px;
}

.signal-row span {
    border: 1px solid #cfe0e3;
    padding: 7px 10px;
    color: var(--teal-dark);
    background: #eef7f8;
    font-size: 0.82rem;
    font-weight: 800;
}

.hero-visual {
    position: relative;
}

.hero-visual::before {
    content: "";
    position: absolute;
    inset: 22px -16px -18px 18px;
    border: 1px solid rgba(31, 111, 120, 0.23);
    background: #d9e8eb;
}

.hero-visual img {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1200 / 760;
    object-fit: cover;
    box-shadow: var(--shadow);
}

.section {
    padding: 78px 0;
    border-top: 1px solid var(--line);
}

.intro-grid,
.split-section,
.contact-section {
    display: grid;
    grid-template-columns: 0.7fr 1.3fr;
    gap: 58px;
}

h2 {
    max-width: 680px;
    margin: 0;
    font-size: clamp(1.85rem, 3.1vw, 3.1rem);
    line-height: 1.05;
    letter-spacing: 0;
}

.bio-text {
    color: var(--muted);
    font-size: 1.06rem;
}

.bio-text p {
    margin: 0 0 18px;
}

.bio-text p:last-child {
    margin-bottom: 0;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    gap: 28px;
    align-items: end;
    margin-bottom: 30px;
}

.section-lead {
    max-width: 430px;
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.expertise-card {
    min-height: 220px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--teal);
    padding: 22px;
    background: rgba(255, 255, 255, 0.86);
}

.expertise-card:nth-child(2),
.expertise-card:nth-child(5) {
    border-left-color: var(--green);
}

.expertise-card:nth-child(3),
.expertise-card:nth-child(6) {
    border-left-color: var(--gold);
}

.expertise-card span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 850;
}

.expertise-card h3 {
    margin: 16px 0 10px;
    font-size: 1.13rem;
}

.expertise-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

.portfolio-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    align-items: end;
    border: 1px solid var(--line);
    border-left: 4px solid var(--green);
    padding: 24px;
    background: rgba(255, 255, 255, 0.9);
}

.portfolio-card > div:first-child {
    min-width: 0;
}

.portfolio-card > div:first-child span {
    color: var(--teal);
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.portfolio-card h3 {
    margin: 10px 0;
    font-size: 1.28rem;
}

.portfolio-card p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
}

.tech-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: end;
    gap: 8px;
    max-width: 270px;
}

.tech-row span {
    border: 1px solid #cfe0e3;
    padding: 6px 8px;
    color: var(--teal-dark);
    background: #eef7f8;
    font-size: 0.76rem;
    font-weight: 850;
}

.text-link {
    grid-column: 1 / -1;
    width: fit-content;
    color: var(--teal);
    font-weight: 850;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.project-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}

.project-panel div {
    padding: 22px;
    background: var(--panel);
}

.project-panel strong {
    display: block;
    margin-bottom: 10px;
    color: var(--ink);
    font-size: 1rem;
}

.project-panel p {
    margin: 0;
    color: var(--muted);
    font-size: 0.94rem;
}

.timeline {
    border-top: 1px solid var(--line);
}

.timeline-item {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 28px;
    padding: 24px 0;
    border-bottom: 1px solid var(--line);
}

.period {
    color: var(--teal);
    font-size: 0.85rem;
    font-weight: 900;
}

.timeline-item h3 {
    margin: 0;
    font-size: 1.15rem;
}

.role-title {
    margin: 4px 0 8px;
    color: var(--teal);
    font-weight: 800;
}

.timeline-item p:last-child {
    margin: 0;
    color: var(--muted);
}

.contact-section {
    align-items: start;
    padding-bottom: 96px;
}

.contact-section > div:first-child p:last-child {
    max-width: 560px;
    color: var(--muted);
    font-size: 1.03rem;
}

.contact-card {
    display: grid;
    gap: 1px;
    border: 1px solid var(--line);
    background: var(--line);
    box-shadow: var(--shadow);
}

.contact-card a {
    display: flex;
    min-height: 54px;
    align-items: center;
    padding: 14px 18px;
    color: var(--ink);
    background: var(--white);
    font-weight: 750;
    text-decoration: none;
}

.contact-card a:hover {
    color: var(--teal);
    background: #eef7f8;
}

#blazor-error-ui {
    display: none;
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 1000;
    max-width: 420px;
    padding: 14px 42px 14px 16px;
    color: #ffffff;
    background: #9b1c1c;
    box-shadow: var(--shadow);
}

#blazor-error-ui .dismiss {
    position: absolute;
    top: 10px;
    right: 14px;
    cursor: pointer;
}

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto;
}

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

.loading-progress circle:last-child {
    stroke: var(--teal);
    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;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
    color: var(--muted);
    text-align: center;
    font-weight: 800;
}

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

@media (max-width: 980px) {
    .site-header {
        grid-template-columns: 1fr auto;
    }

    .main-nav {
        grid-column: 1 / -1;
        justify-content: start;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .hero,
    .intro-grid,
    .split-section,
    .contact-section {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero {
        min-height: auto;
        padding-top: 42px;
    }

    .expertise-grid,
    .project-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .portfolio-card {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .tech-row {
        justify-content: start;
        max-width: none;
    }
}

@media (max-width: 680px) {
    .profile-page {
        width: min(100% - 32px, 1180px);
    }

    .site-header {
        gap: 12px;
        padding: 12px 0;
    }

    .brand span:last-child {
        display: none;
    }

    .main-nav {
        gap: 14px;
        font-size: 0.84rem;
    }

    .language-switch button {
        min-width: 34px;
        padding: 7px 8px;
    }

    h1 {
        max-width: 270px;
        font-size: 1.55rem;
        line-height: 1.08;
    }

    .hero-lead {
        max-width: 270px;
        font-size: 0.88rem;
    }

    .hero {
        gap: 30px;
        padding-bottom: 54px;
        overflow: hidden;
    }

    .hero-copy,
    .hero-visual {
        width: calc(100vw - 32px);
        max-width: calc(100vw - 32px);
    }

    .hero-copy {
        width: 270px;
        max-width: calc(100vw - 32px);
    }

    .hero-visual::before {
        inset: 12px 0 -12px 12px;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .button {
        width: 100%;
    }

    .signal-row {
        gap: 7px;
    }

    .signal-row span {
        padding: 5px 7px;
        font-size: 0.72rem;
    }

    .section {
        padding: 54px 0;
    }

    .expertise-grid,
    .project-panel {
        grid-template-columns: 1fr;
    }

    .expertise-card {
        min-height: auto;
    }

    .timeline-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}
