:root {
    color-scheme: dark;
    font-family: "DM Sans", sans-serif;
    color: #f4f2fa;
    background: #090a10;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    --muted: #9696a8;
    --subtle: #666676;
    --panel: #11121b;
    --line: rgba(255, 255, 255, 0.09);
    --purple: #a547ef;
    --pink: #db67d5;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background:
        radial-gradient(ellipse at 50% -40%, rgba(86, 46, 128, 0.17), transparent 55%),
        #090a10;
}

button,
input,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    color: inherit;
}

.hidden {
    display: none !important;
}

.ambient {
    position: fixed;
    z-index: -1;
    width: 26rem;
    height: 26rem;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.12;
    pointer-events: none;
}

.ambient-one {
    top: 12rem;
    left: -20rem;
    background: #902cec;
}

.ambient-two {
    top: 42rem;
    right: -23rem;
    background: #233ed3;
}

.site-header,
main,
.site-footer {
    width: min(1120px, calc(100% - 64px));
    margin-inline: auto;
}

.site-header {
    position: relative;
    z-index: 1;
    display: flex;
    height: 82px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: "Space Grotesk", sans-serif;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.04em;
}

.brand-mark {
    position: relative;
    display: grid;
    width: 31px;
    height: 31px;
    place-items: center;
    border: 1px solid rgba(186, 105, 248, 0.42);
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(167, 69, 238, 0.2), rgba(120, 62, 215, 0.04));
    color: #f1d9ff;
    font-size: 15px;
}

.brand-muted {
    color: #b97af2;
}

.brand-initial {
    display: block;
    line-height: 1;
}

.brand-period {
    position: absolute;
    right: 5px;
    bottom: 2px;
    color: #b97af2;
    line-height: 1;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 27px;
}

.nav-link {
    color: #a8a7b3;
    font-size: 12px;
    transition: color 160ms ease;
}

.nav-link:hover,
.text-link:hover {
    color: #fff;
}

.language-button,
.dialog-close {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.025);
    color: #d7d4df;
    cursor: pointer;
    font-size: 10px;
    font-weight: 700;
    transition: border-color 160ms ease, background 160ms ease;
}

.language-button {
    display: inline-flex;
    width: auto;
    min-width: 83px;
    height: 34px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 8px;
    border-radius: 999px;
    color: #aaa7b5;
    font-size: 9px;
    letter-spacing: 0.04em;
}

.language-icon {
    width: 15px;
    height: 15px;
    margin-right: 2px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.35;
}

.language-option {
    min-width: 19px;
    padding: 4px 3px;
    border-radius: 999px;
    text-align: center;
    transition: background 160ms ease, color 160ms ease;
}

.language-option.active {
    background: rgba(165, 71, 239, 0.2);
    color: #ead7fc;
    font-weight: 700;
}

.language-divider {
    width: 1px;
    height: 13px;
    background: var(--line);
}

.language-button:hover,
.dialog-close:hover {
    border-color: rgba(185, 122, 242, 0.6);
    background: rgba(165, 71, 239, 0.12);
}

.language-button:hover .language-option.active {
    background: rgba(165, 71, 239, 0.3);
}

.button {
    display: inline-flex;
    min-height: 39px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, opacity 160ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button:disabled {
    cursor: wait;
    opacity: 0.6;
    transform: none;
}

.button-primary {
    background: linear-gradient(110deg, #ad43e6, #803de1);
    box-shadow: 0 7px 24px rgba(153, 57, 223, 0.19);
    color: #fff;
}

.button-primary:hover {
    background: linear-gradient(110deg, #bd5af1, #904ded);
}

.button-quiet {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.025);
    color: #cbc9d3;
}

.button-quiet:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
}

.login-section {
    position: relative;
    display: grid;
    min-height: min(720px, calc(100vh - 130px));
    place-items: center;
    padding: 64px 0 35px;
}

.login-glow {
    position: absolute;
    top: 16%;
    left: 50%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: #7e32cf;
    filter: blur(140px);
    opacity: 0.14;
    transform: translateX(-50%);
    pointer-events: none;
}

.login-card {
    position: relative;
    width: min(100%, 410px);
    padding: 39px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    background: linear-gradient(145deg, rgba(23, 24, 36, 0.96), rgba(14, 15, 23, 0.96));
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.32), inset 0 1px rgba(255, 255, 255, 0.035);
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    color: #aaa3b7;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.15em;
}

.status-dot {
    width: 6px;
    height: 6px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #b75aff;
    box-shadow: 0 0 12px #b75aff;
}

.login-card h1,
.hero h1,
.section-heading h2,
.dialog-heading h2 {
    font-family: "Space Grotesk", sans-serif;
    letter-spacing: -0.055em;
}

.login-card h1 {
    margin: 24px 0 12px;
    font-size: clamp(34px, 7vw, 43px);
    line-height: 1.08;
}

.login-card h1 span,
.hero h1 span {
    color: #b75af0;
}

.login-copy {
    margin: 0 0 27px;
    color: #a09eac;
    font-size: 13px;
    line-height: 1.75;
}

form label {
    display: block;
    margin: 17px 0 8px;
    color: #d7d4de;
    font-size: 11px;
    font-weight: 600;
}

input,
textarea {
    display: block;
    width: 100%;
    min-height: 43px;
    padding: 11px 13px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 7px;
    outline: none;
    background: rgba(5, 6, 11, 0.58);
    color: #f4f2fa;
    font-size: 12px;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

input::placeholder,
textarea::placeholder {
    color: #686777;
}

input:focus,
textarea:focus {
    border-color: rgba(184, 93, 244, 0.7);
    box-shadow: 0 0 0 3px rgba(165, 71, 239, 0.11);
}

input[type="file"] {
    padding: 9px;
    color: #aaa8b4;
    font-size: 10px;
}

input[type="file"]::file-selector-button {
    margin-right: 9px;
    padding: 6px 9px;
    border: 0;
    border-radius: 5px;
    background: rgba(165, 71, 239, 0.18);
    color: #e2c4fc;
    cursor: pointer;
    font-size: 10px;
}

textarea {
    min-height: 84px;
    resize: vertical;
}

.login-submit {
    width: 100%;
    min-height: 44px;
    justify-content: space-between;
    margin-top: 20px;
    padding-inline: 15px;
}

.login-footnote {
    margin: 18px 0 0;
    color: #777583;
    font-size: 10px;
    line-height: 1.6;
    text-align: center;
}

.form-message {
    min-height: 17px;
    margin: 9px 0 0;
    color: #f59eaf;
    font-size: 11px;
    line-height: 1.5;
}

.form-message:empty {
    display: none;
}

.form-message.message-success {
    color: #8cdeb1;
}

.login-caption {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    justify-content: space-between;
    color: #74717e;
    font-size: 9px;
}

.login-caption span:first-child {
    letter-spacing: 0.12em;
}

.portfolio {
    animation: arrive 360ms ease both;
}

@keyframes arrive {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero {
    position: relative;
    display: grid;
    min-height: 394px;
    grid-template-columns: 1.08fr 0.92fr;
    align-items: center;
    overflow: hidden;
    margin-top: 37px;
    padding: 47px 58px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background:
        radial-gradient(ellipse at 82% 52%, rgba(103, 39, 170, 0.2), transparent 34%),
        linear-gradient(115deg, #12131d 10%, #10111a 62%, #141225);
}

.hero-copy {
    position: relative;
    z-index: 1;
}

.hero h1 {
    margin: 23px 0 14px;
    font-size: clamp(38px, 5vw, 58px);
    line-height: 1.03;
}

.hero-copy > p:not(.eyebrow) {
    max-width: 390px;
    margin: 0;
    color: #aaa8b4;
    font-size: 13px;
    line-height: 1.8;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    color: #e1b9ff;
    font-size: 11px;
    font-weight: 600;
    transition: color 160ms ease;
}

.text-link span:last-child {
    font-size: 14px;
}

.hero-art {
    position: relative;
    width: 100%;
    height: 292px;
    justify-self: end;
}

.art-orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px solid rgba(207, 156, 248, 0.21);
    border-radius: 50%;
    transform: translate(-50%, -50%) rotate(-24deg);
}

.orbit-one {
    width: 330px;
    height: 173px;
}

.orbit-two {
    width: 268px;
    height: 236px;
    transform: translate(-50%, -50%) rotate(38deg);
}

.art-core {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    width: 108px;
    height: 108px;
    place-items: center;
    border: 1px solid rgba(213, 172, 248, 0.45);
    border-radius: 30px;
    background: linear-gradient(145deg, #322044, #171321 75%);
    box-shadow: 0 0 70px rgba(159, 72, 220, 0.32), inset 0 1px rgba(255, 255, 255, 0.11);
    transform: translate(-50%, -50%) rotate(-8deg);
}

.art-core span {
    color: #ecd5ff;
    font-family: "Space Grotesk", sans-serif;
    font-size: 53px;
    font-weight: 600;
    transform: rotate(8deg);
}

.art-core i {
    position: absolute;
    right: -7px;
    bottom: -7px;
    width: 16px;
    height: 16px;
    border: 3px solid #171321;
    border-radius: 50%;
    background: #c275f7;
}

.art-label {
    position: absolute;
    color: #8f829e;
    font-size: 8px;
    letter-spacing: 0.15em;
}

.art-label-top {
    top: 27px;
    right: 4px;
}

.art-label-top b {
    color: #c45cff;
}

.art-label-bottom {
    bottom: 25px;
    left: 9px;
}

.art-spark {
    position: absolute;
    color: #d389ff;
}

.spark-one {
    top: 27px;
    left: 45px;
    font-size: 15px;
}

.spark-two {
    right: 39px;
    bottom: 36px;
    color: #8381fb;
    font-size: 12px;
}

.projects-section {
    padding: 76px 0 64px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.section-heading .eyebrow {
    color: #8d8998;
}

.section-heading h2 {
    margin: 12px 0 0;
    font-size: clamp(27px, 4vw, 36px);
    line-height: 1.1;
}

.accent-dot {
    color: #bd60f1;
}

.section-heading .button {
    margin-bottom: 2px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.project-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: linear-gradient(150deg, #151620, #101119);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: rgba(190, 117, 241, 0.35);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.22);
}

.project-cover {
    position: relative;
    display: grid;
    aspect-ratio: 1.72 / 1;
    overflow: hidden;
    place-items: center;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 70% 25%, rgba(193, 82, 230, 0.44), transparent 30%),
        linear-gradient(130deg, #30204a, #171b37 65%, #131322);
}

.source-cover {
    align-content: center;
    gap: 4px;
    background:
        radial-gradient(circle at 75% 18%, rgba(190, 92, 236, 0.38), transparent 32%),
        linear-gradient(130deg, #30204a, #171b37 65%, #131322);
}

.project-cover::before,
.project-cover::after {
    position: absolute;
    width: 180px;
    height: 180px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    content: "";
}

.project-cover::after {
    width: 120px;
    height: 120px;
    border-color: rgba(255, 255, 255, 0.22);
}

.project-cover img {
    position: absolute;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover-letter {
    position: relative;
    z-index: 1;
    color: rgba(244, 226, 255, 0.9);
    font-family: "Space Grotesk", sans-serif;
    font-size: 47px;
    font-weight: 600;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.25);
}

.source-file-count {
    position: relative;
    z-index: 1;
    color: #d3b7ec;
    font-size: 10px;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.project-content {
    padding: 16px 16px 14px;
}

.project-title-row {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 10px;
}

.project-title {
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.4;
}

.project-description {
    min-height: 39px;
    margin: 8px 0 14px;
    color: #9b99a6;
    font-size: 11px;
    line-height: 1.7;
}

.project-tags {
    display: flex;
    min-height: 23px;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border: 1px solid rgba(174, 104, 226, 0.17);
    border-radius: 5px;
    background: rgba(154, 71, 217, 0.1);
    color: #c7a4e7;
    font-size: 9px;
}

.project-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.project-link {
    padding: 0;
    border: 0;
    background: none;
    color: #cf9af4;
    cursor: pointer;
    font-size: 10px;
    font-weight: 600;
}

.project-link:hover {
    color: white;
}

.source-button {
    white-space: nowrap;
}

.secondary-project-link {
    white-space: nowrap;
}

.admin-actions {
    display: flex;
    gap: 5px;
    margin-left: auto;
}

.icon-button {
    display: grid;
    width: 28px;
    height: 27px;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: #9d9aa8;
    cursor: pointer;
    font-size: 12px;
}

.icon-button:hover {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.045);
    color: white;
}

.icon-button.delete:hover {
    color: #ff8e9a;
}

.empty-state {
    padding: 53px 24px;
    border: 1px dashed rgba(255, 255, 255, 0.13);
    border-radius: 12px;
    text-align: center;
}

.empty-icon {
    color: #bd66ed;
    font-size: 25px;
}

.empty-state h3 {
    margin: 12px 0 5px;
    font-family: "Space Grotesk", sans-serif;
    font-size: 17px;
}

.empty-state p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.about-strip {
    display: flex;
    min-height: 117px;
    align-items: center;
    gap: 19px;
    padding: 22px 26px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: linear-gradient(100deg, rgba(24, 22, 34, 0.95), rgba(17, 18, 26, 0.9));
}

.about-symbol {
    position: relative;
    display: grid;
    width: 43px;
    height: 43px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(186, 105, 248, 0.35);
    border-radius: 12px;
    background: rgba(165, 71, 239, 0.12);
    color: #ead7fc;
    font-family: "Space Grotesk", sans-serif;
    font-size: 19px;
    font-weight: 600;
}

.about-symbol .brand-period {
    right: 7px;
    bottom: 3px;
    color: #b75af0;
}

.about-strip .eyebrow {
    color: #8d8998;
    font-size: 8px;
}

.about-line {
    margin: 7px 0 0;
    color: #dedbe5;
    font-size: 12px;
}

.about-strip .text-link {
    margin: 0 0 0 auto;
    white-space: nowrap;
}

.site-footer {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    margin-top: 34px;
    border-top: 1px solid var(--line);
    color: #777583;
    font-size: 9px;
}

.cookie-settings-button {
    padding: 5px 0;
    border: 0;
    background: none;
    color: #9692a2;
    cursor: pointer;
    font-size: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cookie-settings-button:hover,
.cookie-settings-button:focus-visible {
    color: #e4c8fa;
}

.cookie-banner {
    position: fixed;
    z-index: 10;
    right: max(20px, calc((100vw - 1120px) / 2));
    bottom: 20px;
    display: flex;
    width: min(620px, calc(100vw - 40px));
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    padding: 22px;
    border: 1px solid rgba(186, 105, 248, 0.24);
    border-radius: 13px;
    background: rgba(17, 18, 27, 0.97);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(16px);
}

.cookie-banner-copy {
    min-width: 0;
}

.cookie-banner-copy h2 {
    margin: 7px 0 6px;
    font-family: "Space Grotesk", sans-serif;
    font-size: 17px;
    letter-spacing: -0.035em;
}

.cookie-banner-copy > p:last-child {
    max-width: 360px;
    margin: 0;
    color: #aaa7b5;
    font-size: 11px;
    line-height: 1.6;
}

.cookie-banner-actions {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column-reverse;
    gap: 7px;
}

.cookie-banner-actions .button {
    min-height: 34px;
    white-space: nowrap;
    font-size: 10px;
}

.project-dialog {
    width: min(100% - 32px, 490px);
    max-height: min(90vh, 760px);
    padding: 27px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 13px;
    background: #12131d;
    color: #f4f2fa;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.64);
}

.project-dialog::backdrop {
    background: rgba(3, 3, 8, 0.76);
    backdrop-filter: blur(5px);
}

.code-dialog {
    width: min(100% - 32px, 1000px);
    height: min(82vh, 760px);
    max-height: 90vh;
    padding: 23px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 13px;
    background: #101119;
    color: #f4f2fa;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.64);
}

.code-dialog::backdrop {
    background: rgba(3, 3, 8, 0.76);
    backdrop-filter: blur(5px);
}

.code-dialog-heading {
    display: flex;
    min-height: 55px;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.code-dialog-heading h2 {
    max-width: min(70vw, 650px);
    overflow: hidden;
    margin: 6px 0 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: 21px;
    letter-spacing: -0.04em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.code-browser {
    display: grid;
    height: calc(100% - 74px);
    min-height: 0;
    grid-template-columns: minmax(170px, 0.28fr) minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #0b0c12;
}

.code-file-panel {
    min-width: 0;
    overflow: auto;
    padding: 13px 8px;
    border-right: 1px solid var(--line);
    background: #11121a;
}

.code-panel-label {
    margin: 0 8px 10px;
    color: #807c8d;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.code-file-list {
    display: grid;
    align-content: start;
    gap: 1px;
}

.code-tree-folder {
    min-width: 0;
}

.code-folder-button,
.code-file-button {
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 29px;
    align-items: center;
    gap: 7px;
    overflow: hidden;
    padding: 6px 7px 6px calc(7px + var(--tree-depth, 0) * 13px);
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #aaa7b5;
    cursor: pointer;
    font-family: Consolas, "Courier New", monospace;
    font-size: 10px;
    text-align: left;
    transition: background 140ms ease, color 140ms ease;
}

.code-folder-button:hover,
.code-folder-button:focus-visible,
.code-folder-button.contains-active,
.code-file-button:hover,
.code-file-button:focus-visible {
    outline: none;
    background: rgba(165, 71, 239, 0.1);
    color: #e4c8fa;
}

.code-folder-button[aria-expanded="false"] .code-tree-chevron {
    transform: rotate(-90deg);
}

.code-tree-chevron {
    width: 8px;
    flex: 0 0 8px;
    color: #777487;
    font-size: 10px;
    line-height: 1;
    transition: transform 140ms ease;
}

.code-tree-chevron::before {
    content: "▾";
}

.code-tree-folder-icon {
    position: relative;
    width: 12px;
    height: 8px;
    flex: 0 0 12px;
    border: 1px solid #9a81b3;
    border-radius: 2px;
    background: rgba(165, 71, 239, 0.12);
}

.code-tree-folder-icon::before {
    position: absolute;
    top: -4px;
    left: 0;
    width: 5px;
    height: 3px;
    border: 1px solid #9a81b3;
    border-bottom: 0;
    border-radius: 2px 2px 0 0;
    content: "";
}

.code-tree-label,
.code-file-label {
    text-overflow: ellipsis;
    white-space: nowrap;
}

.code-tree-label,
.code-file-label {
    min-width: 0;
    overflow: hidden;
}

.code-file-button {
    gap: 0;
}

.code-file-label {
    display: block;
    width: 100%;
}

.code-file-button.active {
    background: rgba(165, 71, 239, 0.13);
    color: #e4c8fa;
}

.code-tree-children[hidden] {
    display: none;
}

.code-content-panel {
    display: flex;
    min-width: 0;
    min-height: 0;
    flex-direction: column;
}

.code-toolbar {
    display: flex;
    min-height: 43px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 5px 12px;
    border-bottom: 1px solid var(--line);
    color: #aaa7b5;
    font-family: Consolas, "Courier New", monospace;
    font-size: 10px;
}

.code-toolbar > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.code-toolbar-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
}

.code-delete-button {
    min-height: 29px;
    padding-inline: 9px;
    color: #d8a5b0;
    font-size: 10px;
}

.code-delete-button:hover {
    border-color: rgba(230, 112, 137, 0.4);
    background: rgba(230, 72, 106, 0.12);
    color: #ffd0d9;
}

.copy-code-button {
    min-height: 29px;
    flex: 0 0 auto;
    padding-inline: 10px;
    font-size: 10px;
}

.source-code {
    flex: 1;
    overflow: auto;
    margin: 0;
    padding: 17px;
    color: #dedbe6;
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
    line-height: 1.65;
    tab-size: 4;
    white-space: pre;
}

.source-code code {
    font: inherit;
}

.syntax-comment {
    color: #777c8f;
    font-style: italic;
}

.syntax-string {
    color: #a9d68a;
}

.syntax-keyword {
    color: #c792ea;
}

.syntax-literal,
.syntax-number {
    color: #f0a66a;
}

.syntax-function {
    color: #82c8e8;
}

.syntax-property,
.syntax-attribute {
    color: #e6c07b;
}

.syntax-tag {
    color: #e58aa5;
}

.syntax-operator {
    color: #b7a8d8;
}

.code-message {
    position: absolute;
    bottom: 4px;
    left: 24px;
}

.dialog-heading {
    display: flex;
    align-items: start;
    justify-content: space-between;
    margin-bottom: 21px;
}

.dialog-heading h2 {
    margin: 8px 0 0;
    font-size: 25px;
}

.dialog-heading .eyebrow {
    color: #bfa1d9;
}

.dialog-close {
    font-size: 21px;
    font-weight: 400;
}

.form-hint {
    margin: 7px 0 0;
    color: #777583;
    font-size: 10px;
}

.dialog-actions {
    display: flex;
    justify-content: end;
    gap: 9px;
    margin-top: 13px;
}

@media (max-width: 800px) {
    .site-header,
    main,
    .site-footer {
        width: min(100% - 40px, 640px);
    }

    .hero {
        min-height: 340px;
        padding: 38px;
    }

    .hero-art {
        transform: scale(0.82);
        transform-origin: center right;
    }

    .project-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    html {
        scroll-padding-top: 76px;
    }

    .site-header,
    main,
    .site-footer {
        width: calc(100% - 36px);
    }

    .site-header {
        height: 69px;
    }

    .header-actions {
        gap: 15px;
    }

    .nav-link {
        display: none;
    }

    .button-quiet#sign-out-button {
        min-height: 34px;
        padding-inline: 10px;
        font-size: 10px;
    }

    .login-section {
        min-height: calc(100svh - 125px);
        padding: 46px 0 35px;
    }

    .login-card {
        padding: 29px 24px;
    }

    .login-caption {
        gap: 12px;
        font-size: 8px;
    }

    .hero {
        min-height: auto;
        grid-template-columns: 1fr;
        margin-top: 23px;
        padding: 32px 25px 9px;
    }

    .hero h1 {
        font-size: clamp(39px, 10vw, 52px);
    }

    .hero-art {
        width: min(100%, 360px);
        height: 225px;
        justify-self: center;
        transform: scale(0.84);
        transform-origin: center;
    }

    .projects-section {
        padding: 57px 0 45px;
    }

    .section-heading {
        align-items: start;
    }

    .section-heading h2 {
        max-width: 200px;
        font-size: 30px;
    }

    .section-heading .button {
        min-height: 35px;
        gap: 5px;
        padding-inline: 10px;
        font-size: 10px;
    }

    .project-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .code-dialog {
        width: calc(100% - 20px);
        height: min(86vh, 760px);
        padding: 15px;
    }

    .code-browser {
        grid-template-columns: minmax(105px, 0.38fr) minmax(0, 1fr);
    }

    .code-file-panel {
        padding-inline: 5px;
    }

    .code-file-button {
        padding-left: calc(6px + var(--tree-depth, 0) * 10px);
        font-size: 9px;
    }

    .code-folder-button {
        gap: 5px;
        padding-left: calc(6px + var(--tree-depth, 0) * 10px);
        font-size: 9px;
    }

    .source-code {
        padding: 12px;
        font-size: 10px;
    }

    .code-toolbar {
        gap: 6px;
        padding-inline: 8px;
    }

    .code-toolbar-actions {
        gap: 3px;
    }

    .code-delete-button {
        padding-inline: 6px;
        font-size: 9px;
    }

    .copy-code-button {
        padding-inline: 7px;
    }

    .project-cover {
        aspect-ratio: 1.9 / 1;
    }

    .project-description {
        min-height: 0;
    }

    .about-strip {
        align-items: start;
        gap: 13px;
        padding: 18px;
    }

    .about-symbol {
        width: 37px;
        height: 37px;
    }

    .about-line {
        line-height: 1.6;
    }

    .about-strip .text-link {
        align-self: center;
        gap: 5px;
        font-size: 10px;
    }

    .site-footer {
        min-height: 62px;
    }

    .cookie-banner {
        right: 10px;
        bottom: 10px;
        width: calc(100vw - 20px);
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
        padding: 17px;
    }

    .cookie-banner-copy > p:last-child {
        max-width: none;
    }

    .cookie-banner-actions {
        flex-direction: row;
        justify-content: end;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
