@font-face {
    font-family: "Space Grotesk";
    src: url("/fonts/space-grotesk.ttf") format("truetype");
    font-weight: 300 700;
    font-display: swap;
}
@font-face {
    font-family: "JetBrains Mono";
    src: url("/fonts/jetbrains-mono.ttf") format("truetype");
    font-weight: 100 800;
    font-display: swap;
}

:root {
    color-scheme: dark;
    --background: #121212;
    --surface: #1c1c1c;
    --raised: #252525;
    --text: #ededed;
    --muted: #999995;
    --faint: #797975;
    --green: #8bc34a;
    --border: #303030;
    --mono: "JetBrains Mono", Consolas, monospace;
    --sans: "Space Grotesk", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 32px; }
body { margin: 0; background: var(--background); color: var(--text); font: 16px/1.7 var(--sans); }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { border-radius: 4px; }
::selection { background: #8bc34a40; color: #fff; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 5px; }
h1, h2, h3, p, pre { margin: 0; }
h1, h2, h3 { color: #f6f6f4; line-height: 1.2; }
h1 { font-size: clamp(36px, 3.5vw, 48px); font-weight: 700; letter-spacing: -.045em; }
img { max-width: 100%; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.site-shell { width: min(1100px, calc(100% - 64px)); margin: 0 auto; padding-top: clamp(54px, 7vw, 106px); }
.site-shell:has(floating-models) { isolation: isolate; }
.accent { color: var(--green); }
.icon { display: inline-block; flex-shrink: 0; vertical-align: middle; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -80px; left: 20px; z-index: 100; padding: 10px 18px; background: var(--green); color: #121212; }
.skip-link:focus { top: 16px; }
.site-shell:has(> .hero) { padding-top: clamp(48px, 5vw, 80px); }
.hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.profile, .profile-visual { min-width: 0; }
.hero h1 { font-size: clamp(38px, 4.3vw, 60px); }
.hero .profile-role { margin: 14px 0 24px; }
.hero .profile-bio { max-width: 48ch; margin-bottom: 22px; text-wrap: pretty; }
.profile-focus { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; margin: 0 0 28px; padding: 0; color: #b4b8ac; font: 11px/1.7 var(--mono); }
.profile-focus li { display: inline-flex; align-items: center; gap: 8px; }
.profile-focus li::before { content: "/"; color: var(--green); }
.hero .profile-projects-link { gap: 20px; min-height: 54px; padding: 14px 24px; margin-top: 6px; border-radius: 7px; font-size: 15px; font-weight: 600; }
.profile-projects-link .icon { transition: transform .18s; }
.profile-projects-link:hover .icon { transform: translateX(3px); }
.hero .profile-visual > hologram-portrait { height: 360px; margin: 0; }
.profile-visual > .profile-image, .profile-visual > .profile-placeholder { height: 360px; margin: 0; }
.profile-role { font: 500 18px/1.5 var(--mono); color: var(--green); margin: 14px 0 26px; }
.profile-image, .profile-placeholder { display: block; width: 100%; height: 300px; border-radius: 6px; object-fit: cover; object-position: center; margin-bottom: 28px; }
.profile-placeholder { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(ellipse at 50% 75%, #29311d 0%, #181c15 35%, #191b17 68%, #1c1e18 100%); border: 1px solid #2c3025; }
.portrait-grid { position: absolute; inset: 0; background-image: linear-gradient(#9fc77a08 1px, transparent 1px), linear-gradient(90deg, #9fc77a08 1px, transparent 1px); background-size: 32px 32px; mask-image: linear-gradient(transparent, #000 45%, transparent); }
.portrait-mark { z-index: 1; font: 400 clamp(42px, 5vw, 66px)/1 var(--mono); letter-spacing: -.07em; color: #5b7145; }
.portrait-mark > span { color: #bcceaa; }
.portrait-caption { position: absolute; bottom: 29px; font: 10px/1.5 var(--mono); color: #a5ab9a; letter-spacing: .025em; }
.portrait-corner { position: absolute; width: 21px; height: 21px; border-color: #596a41; border-style: solid; }
.top-left { top: 22px; left: 22px; border-width: 1px 0 0 1px; }
.bottom-right { right: 22px; bottom: 22px; border-width: 0 1px 1px 0; }
.profile-bio { color: var(--muted); line-height: 1.7; margin-bottom: 30px; max-width: 95%; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 10px 18px; border: 1px solid #363634; border-radius: 4px; background: transparent; font: 600 13px/1.5 var(--sans); color: var(--text); transition: background .18s, border-color .18s, transform .18s; }
.button:hover { background: #ffffff08; border-color: #777; transform: translateY(-1px); }
.button-primary { background: var(--green); border-color: var(--green); color: #141a0e; }
.button-primary:hover { background: #9ed55d; border-color: #9ed55d; }
.project-main-link { min-height: 56px; padding: 14px 24px; font-size: 16px; }
.button-small { min-height: 42px; padding: 9px 15px; }
.button .icon { width: 15px; height: 15px; }
.button-unavailable { color: #858581; cursor: default; }
.button-unavailable:hover { background: transparent; border-color: #363634; transform: none; }
.status-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--green); vertical-align: middle; margin-right: 5px; }
.window { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface); box-shadow: 0 16px 50px #0003; }
.window-chrome { height: 36px; display: flex; gap: 7px; align-items: center; padding: 0 16px; background: #252525; border-bottom: 1px solid #303030; }
.window-dot { width: 10px; height: 10px; border-radius: 50%; }
.window-dot.red { background: #ff6058; }
.window-dot.yellow { background: #febc2e; }
.window-dot.green { background: #28c840; }
.window-caption { margin-left: auto; color: #9a9a96; font: 9px/1 var(--mono); letter-spacing: .12em; }
.window-filename { display: flex; align-items: center; gap: 11px; min-height: 46px; padding: 0 16px; border-bottom: 1px solid #303030; font: 12px/1.5 var(--mono); }
.window-filename .icon { color: #858580; width: 15px; height: 15px; }
.projects-section { margin-top: 68px; padding-top: 32px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 48px; }
.projects-section > .section-heading { gap: 28px; margin-bottom: 36px; }
.projects-section > .section-heading::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.projects-section .section-title { font-family: var(--sans); flex-shrink: 0; }
.section-title { font: 600 clamp(24px, 3vw, 32px)/1.3 var(--mono); letter-spacing: -.04em; }
.section-title > span { color: var(--green); margin-right: 8px; }
.section-meta { font: 10px/1.5 var(--mono); color: var(--faint); }
.projects-list { display: flex; flex-direction: column; gap: 44px; }
.eyebrow { color: var(--faint); font: 10px/1.7 var(--mono); letter-spacing: .06em; }
.text-link { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.text-link:hover { color: var(--green); }
.contact-body { display: grid; grid-template-columns: .85fr 1fr; gap: 72px; padding: 46px; }
.contact-intro h3 { font-size: 36px; letter-spacing: -.04em; margin: 20px 0; }
.contact-intro > p { color: var(--muted); font-size: 14px; max-width: 300px; }
.contact-intro .contact-note { color: var(--faint); font: 11px/1.8 var(--mono); margin-top: 32px; }
.contact-email { display: inline-flex; align-items: center; gap: 10px; color: var(--green); margin-top: 24px; overflow-wrap: anywhere; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field label { font: 12px/1.5 var(--mono); color: var(--green); }
.field input, .field textarea { width: 100%; min-width: 0; color: var(--text); background: var(--background); border: 1px solid #383836; padding: 11px 13px; font-size: 14px; }
.field textarea { resize: vertical; min-height: 115px; }
.field input::placeholder, .field textarea::placeholder { color: #777773; }
fieldset:disabled { opacity: .55; }
fieldset:disabled button { cursor: not-allowed; }
.form-note { margin-top: 12px; font-size: 11px; line-height: 1.7; color: var(--muted); }
.validation-message { font-size: 12px; color: #f58b82; }
.site-footer { margin-top: 72px; border-top: 1px solid #292927; padding: 28px 0 35px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--faint); font: 10px/1.8 var(--mono); }
.site-footer a:hover { color: var(--text); }
.footer-signature { color: #b0b0a9; }
.footer-signature > span { color: var(--green); margin-right: 6px; font-size: 17px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font: 12px/1.7 var(--mono); margin-bottom: 42px; }
.back-link:hover { color: var(--green); }
.detail-page { max-width: 850px; margin: 0 auto; }
.detail-page h1 { margin: 14px 0 20px; }
.detail-description { color: var(--muted); font-size: 18px; margin: 26px 0; max-width: 760px; }
.detail-gallery { margin: 40px 0; }
.detail-page h2 { font: 500 24px/1.5 var(--mono); margin: 40px 0 20px; }
.detail-highlights { padding-left: 22px; color: var(--muted); }
.detail-highlights li { margin: 12px 0; padding-left: 8px; }
.detail-highlights li::marker { color: var(--green); }
.sample-note { border-left: 2px solid var(--green); padding-left: 15px; margin: 22px 0; color: var(--muted); font-size: 14px; }
.cv-skills { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.cv-skills dt { color: var(--green); font: 13px/1.7 var(--mono); }
.cv-skills dd { margin: 8px 0 0; color: var(--muted); }
.error-page { min-height: 55vh; padding-top: 40px; }
.error-page p { margin: 24px 0; color: var(--muted); }
#blazor-error-ui { display: none; position: fixed; bottom: 0; width: 100%; z-index: 1000; padding: 16px 48px 16px 24px; background: #272318; color: #f2d79a; border-top: 1px solid #5c502c; font-size: 14px; }
#blazor-error-ui a { margin-left: 12px; text-decoration: underline; }
#blazor-error-ui .dismiss { position: absolute; right: 16px; top: 9px; color: inherit; background: transparent; border: 0; font-size: 24px; }

@media (max-width: 1000px) {
    .button-row { gap: 8px; }
    .button { padding: 10px 13px; }
    .contact-body { gap: 35px; padding: 32px; }
}
@media (max-width: 800px) {
    .site-shell { width: min(600px, calc(100% - 48px)); padding-top: 50px; }
    .profile-image, .profile-placeholder { height: 320px; }
    .hero { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .hero .profile-bio { max-width: 100%; }
    .profile-focus { margin-bottom: 16px; }
    .hero .profile-visual > hologram-portrait, .profile-visual > .profile-image, .profile-visual > .profile-placeholder { height: 320px; }
    .profile-bio { max-width: 100%; }
    .portrait-mark { font-size: 64px; }
    .projects-section { margin-top: 52px; padding-top: 28px; }
    .projects-list { gap: 32px; }
    .projects-section > .section-heading { gap: 20px; margin-bottom: 28px; }
    .section-heading { margin-bottom: 32px; }
    .contact-body { grid-template-columns: 1fr; gap: 32px; }
    .contact-intro h3 br { display: none; }
    .contact-intro > p { max-width: 100%; }
    .site-footer { flex-wrap: wrap; margin-top: 52px; gap: 15px; }
    .site-footer > span { order: 3; width: 100%; }
}
@media (max-width: 420px) {
    .site-shell { width: calc(100% - 32px); padding-top: 35px; }
    .profile-image, .profile-placeholder { height: 260px; }
    .site-shell:has(> .hero) { padding-top: 35px; }
    .hero h1 { font-size: clamp(34px, 9.5vw, 40px); }
    .hero .profile-visual > hologram-portrait, .profile-visual > .profile-image, .profile-visual > .profile-placeholder { height: 280px; }
    .profile-role { font-size: 16px; }
    .button { font-size: 12px; padding: 10px 12px; }
    .button .icon { width: 13px; height: 13px; }
    .section-meta { display: none; }
    .contact-body { padding: 24px; }
    .contact-intro h3 { font-size: 29px; }
    .window-caption { font-size: 8px; }
    .cv-skills { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
    :root { --text: #111; --muted: #444; --green: #3b5c19; --faint: #555; }
    body { background: white; color: black; }
    .site-shell { width: 100%; padding: 0; }
    h1, h2, h3 { color: black; }
    .site-footer, .back-link, .skip-link, #blazor-error-ui { display: none !important; }
    .detail-page { max-width: none; }
    a { text-decoration: underline; }
}
