/* --------------------------------------------------------------------------
   Production portfolio composition
   -------------------------------------------------------------------------- */

html {
    scrollbar-gutter: stable;
}

.stage {
    overflow: visible;
}

.portfolio-entry {
    position: relative;
    width: min(100%, 40rem);
    min-width: 0;
    max-width: 100%;
    gap: 1rem;
    padding: 1.12rem;
    overflow: hidden;
    border-color: rgba(93, 218, 255, 0.28);
    border-radius: 16px;
    background:
        radial-gradient(circle at 5% 0%, rgba(76, 214, 255, 0.10), transparent 24rem),
        radial-gradient(circle at 100% 100%, rgba(124, 100, 255, 0.11), transparent 22rem),
        rgba(5, 10, 18, 0.82);
    box-shadow:
        inset 0 1px 0 rgba(204, 244, 255, 0.055),
        0 28px 72px rgba(0, 0, 0, 0.26),
        0 0 38px rgba(54, 194, 255, 0.08);
    animation: portfolio-menu-arrival 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.portfolio-entry::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: 0;
    left: -28%;
    width: 28%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(109, 232, 255, 0.95),
        rgba(145, 121, 255, 0.88),
        transparent
    );
    box-shadow: 0 0 14px rgba(92, 217, 255, 0.34);
    animation: portfolio-menu-scan 2.2s ease-out 420ms 1 both;
}

.portfolio-entry > * {
    position: relative;
    z-index: 1;
}

.portfolio-role {
    color: rgba(210, 246, 255, 0.96);
    font-size: 0.86rem;
    text-shadow: 0 0 16px rgba(76, 217, 255, 0.18);
}

.portfolio-intro {
    color: rgba(202, 220, 245, 0.72);
    font-size: 0.87rem;
}

.portfolio-nav {
    gap: 0.62rem;
}

.portfolio-nav-button {
    min-height: 5.4rem;
    padding: 0.92rem 0.84rem;
    border-color: rgba(109, 207, 245, 0.18);
    border-radius: 11px;
    background:
        linear-gradient(180deg, rgba(65, 119, 155, 0.055), transparent),
        rgba(7, 15, 25, 0.88);
    box-shadow:
        inset 0 1px 0 rgba(208, 244, 255, 0.035),
        0 10px 28px rgba(0, 0, 0, 0.14);
}

.portfolio-nav-button--primary {
    border-color: rgba(74, 225, 255, 0.46);
    background:
        linear-gradient(135deg, rgba(31, 176, 213, 0.17), rgba(91, 76, 207, 0.14)),
        rgba(7, 16, 27, 0.94);
    box-shadow:
        inset 0 1px 0 rgba(219, 249, 255, 0.07),
        0 0 0 1px rgba(57, 214, 247, 0.035),
        0 12px 38px rgba(0, 0, 0, 0.18),
        0 0 34px rgba(48, 207, 244, 0.13);
    animation: portfolio-primary-cue 2.7s ease-in-out 650ms 1;
}

.portfolio-nav-button:hover,
.portfolio-nav-button:focus-visible {
    border-color: rgba(104, 230, 255, 0.46);
    background:
        linear-gradient(135deg, rgba(48, 203, 235, 0.13), rgba(105, 86, 225, 0.12)),
        rgba(8, 17, 28, 0.95);
    box-shadow:
        inset 0 1px 0 rgba(225, 250, 255, 0.07),
        0 0 24px rgba(67, 218, 249, 0.12),
        0 14px 34px rgba(0, 0, 0, 0.22);
}

.portfolio-nav-copy strong {
    color: rgba(235, 251, 255, 0.97);
    font-size: 0.94rem;
    font-weight: 760;
    letter-spacing: 0.04em;
}

.portfolio-nav-copy small {
    color: rgba(176, 213, 235, 0.67);
    font-size: 0.66rem;
}

.portfolio-nav-index {
    color: rgba(87, 225, 255, 0.82);
}

.portfolio-nav-arrow {
    color: rgba(116, 230, 255, 0.90);
    font-size: 1.02rem;
    text-shadow: 0 0 12px rgba(72, 216, 249, 0.18);
}

.shell {
    grid-template-columns: minmax(0, 1.22fr) minmax(18rem, 23rem);
    gap: clamp(2rem, 5vw, 6.5rem);
    align-items: center;
    min-width: 0;
}

.hero-stack {
    gap: 1.45rem;
}

.portfolio-entry {
    margin-bottom: 0.65rem;
}

.title {
    margin-top: 0.45rem;
}

.decode-hint {
    margin-top: 0.35rem;
}

.decode-hint.is-visible {
    opacity: 0.72;
}

.contact-stack {
    display: grid;
    align-content: center;
    gap: 1rem;
    width: 100%;
    max-width: 23rem;
    min-width: 0;
}

.contact-stack .contact-panel,
.contact-stack .contact-form,
.contact-stack .field,
.contact-stack .submit-row {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.system-dock--contact {
    position: relative;
    z-index: 8;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    justify-self: stretch;
}

.system-dock--contact .telemetry {
    width: 100%;
    max-width: none;
    justify-content: flex-start;
    padding: 0.58rem 0.66rem;
    border-color: rgba(67, 218, 201, 0.30);
    border-radius: 14px;
    background:
        radial-gradient(circle at 0% 50%, rgba(63, 214, 195, 0.085), transparent 12rem),
        rgba(5, 12, 18, 0.92);
    box-shadow:
        inset 0 1px 0 rgba(211, 255, 247, 0.045),
        0 12px 36px rgba(0, 0, 0, 0.22),
        0 0 26px rgba(47, 216, 194, 0.07);
}

.system-dock--contact .telemetry::before {
    background: rgba(88, 239, 206, 0.96);
    box-shadow:
        0 0 9px rgba(74, 236, 201, 0.62),
        0 0 24px rgba(74, 236, 201, 0.20);
}

.telemetry-mode-copy {
    display: grid;
    gap: 0.14rem;
    min-width: 0;
    text-align: left;
}

.telemetry-mode-copy strong {
    color: inherit;
    font: inherit;
    font-weight: 760;
    letter-spacing: 0.10em;
}

.telemetry-mode-copy small {
    color: rgba(178, 229, 219, 0.70);
    font-size: 0.58rem;
    font-weight: 520;
    line-height: 1.12;
    letter-spacing: 0.025em;
    text-transform: none;
    white-space: nowrap;
}

.system-dock--contact .telemetry-mode {
    flex: 0 0 auto;
    gap: 0.54rem;
    padding: 0.44rem 0.62rem;
    border-color: rgba(68, 226, 201, 0.28);
    background:
        linear-gradient(135deg, rgba(50, 213, 187, 0.10), rgba(54, 112, 194, 0.07));
    color: rgba(218, 255, 247, 0.98);
    box-shadow:
        inset 0 1px 0 rgba(224, 255, 250, 0.05),
        0 0 18px rgba(52, 217, 191, 0.08);
    animation: terminal-cue 2.8s ease-in-out 1s 3;
}

.system-dock--contact .telemetry-mode-icon {
    color: rgba(86, 240, 211, 1);
    text-shadow:
        0 0 8px rgba(73, 236, 206, 0.46),
        0 0 18px rgba(73, 236, 206, 0.16);
}

.telemetry-mode-enter {
    color: rgba(94, 237, 210, 0.82);
    font-size: 0.88rem;
    transition: transform 180ms ease, color 180ms ease;
}

.telemetry-mode:hover .telemetry-mode-enter,
.telemetry-mode:focus-visible .telemetry-mode-enter,
.telemetry-mode[aria-expanded="true"] .telemetry-mode-enter {
    color: rgba(239, 255, 251, 0.96);
    transform: translateX(2px);
}

.system-dock--contact .telemetry-text {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.system-dock--contact .telemetry-rev {
    flex: 0 0 auto;
}

.terminal-teaser {
    margin: 0.42rem 0 0 0.62rem;
    color: rgba(137, 214, 204, 0.66);
    font-family: var(--font-mono);
    font-size: 0.58rem;
    line-height: 1.3;
    letter-spacing: 0.06em;
}

.terminal-teaser span {
    color: rgba(78, 237, 208, 0.92);
}

.system-dock--contact .system-panel {
    z-index: 40;
    left: 0;
    right: auto;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.system-dock--contact .system-panel.is-open {
    border-color: rgba(70, 222, 202, 0.22);
    box-shadow:
        inset 0 1px 0 rgba(223, 255, 250, 0.035),
        0 24px 70px rgba(0, 0, 0, 0.34),
        0 0 34px rgba(49, 215, 194, 0.07);
}

@keyframes portfolio-menu-arrival {
    from {
        opacity: 0;
        transform: translateY(-12px);
        filter: saturate(0.7) brightness(0.82);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: saturate(1) brightness(1);
    }
}

@keyframes portfolio-menu-scan {
    from {
        left: -28%;
        opacity: 0;
    }
    18% {
        opacity: 1;
    }
    to {
        left: 104%;
        opacity: 0;
    }
}

@keyframes portfolio-primary-cue {
    0%, 100% {
        border-color: rgba(74, 225, 255, 0.46);
        box-shadow:
            inset 0 1px 0 rgba(219, 249, 255, 0.07),
            0 0 0 1px rgba(57, 214, 247, 0.035),
            0 12px 38px rgba(0, 0, 0, 0.18),
            0 0 34px rgba(48, 207, 244, 0.13);
    }
    50% {
        border-color: rgba(114, 238, 255, 0.72);
        box-shadow:
            inset 0 1px 0 rgba(227, 252, 255, 0.09),
            0 0 0 1px rgba(82, 224, 252, 0.08),
            0 14px 42px rgba(0, 0, 0, 0.20),
            0 0 54px rgba(48, 207, 244, 0.22);
    }
}

@keyframes terminal-cue {
    0%, 100% {
        box-shadow:
            inset 0 1px 0 rgba(224, 255, 250, 0.05),
            0 0 18px rgba(52, 217, 191, 0.08);
    }
    50% {
        box-shadow:
            inset 0 1px 0 rgba(224, 255, 250, 0.07),
            0 0 26px rgba(52, 217, 191, 0.18);
    }
}

/* --------------------------------------------------------------------------
   Responsive layout — single source of truth
   -------------------------------------------------------------------------- */

body.has-portfolio-dialog,
body.has-contact-sheet {
    overflow: hidden;
}

.contact-sheet-close {
    display: none;
}

@media (max-width: 900px) {
    html,
    body {
        inline-size: 100%;
        max-inline-size: 100%;
        overflow-x: clip;
        scrollbar-gutter: auto;
    }

    .portfolio-dialog,
    .contact-stack.is-contact-open {
        box-sizing: border-box;
        inset: 0 auto auto 0;
        inline-size: 100vw;
        inline-size: 100dvw;
        max-inline-size: 100dvw;
        block-size: 100vh;
        block-size: 100dvh;
        max-block-size: 100dvh;
        margin: 0;
        overflow-x: clip;
    }

    .portfolio-dialog *,
    .contact-stack.is-contact-open * {
        min-inline-size: 0;
        max-inline-size: 100%;
        box-sizing: border-box;
    }
    .portfolio-dialog {
        place-items: stretch;
        padding: 0;
        overflow: hidden;
    }

    .portfolio-dialog-card {
        inline-size: 100%;
        max-inline-size: 100%;
        block-size: 100%;
        max-block-size: 100%;
        margin: 0;
        overflow-x: clip;
        padding:
            max(1rem, env(safe-area-inset-top))
            clamp(0.9rem, 3vw, 1.35rem)
            max(1rem, env(safe-area-inset-bottom));
        border-width: 0;
        border-radius: 0;
    }

    .portfolio-dialog-card,
    .portfolio-dialog-card > *,
    .project-list,
    .project-card,
    .project-meta,
    .about-grid,
    .about-copy,
    .stack-list {
        min-inline-size: 0;
        max-inline-size: 100%;
    }

    .project-list,
    .about-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .project-card:first-child {
        grid-column: auto;
    }

    /* The shell creates a stacking context; lift it above stage-level controls. */
    body.has-contact-sheet .shell {
        z-index: 30;
    }

    .contact-stack.is-contact-open {
        position: fixed;
        z-index: 30;
        display: grid;
        align-content: start;
        gap: 1rem;
        padding:
            max(0.75rem, env(safe-area-inset-top))
            clamp(0.8rem, 3vw, 1.25rem)
            max(1rem, env(safe-area-inset-bottom));
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        background:
            radial-gradient(circle at 20% 0%, rgba(76, 214, 255, 0.08), transparent 20rem),
            rgba(3, 7, 13, 0.985);
    }

    .contact-stack.is-contact-open .contact-sheet-close {
        position: sticky;
        z-index: 45;
        top: max(0.25rem, env(safe-area-inset-top));
        display: grid;
        place-items: center;
        justify-self: end;
        width: 2.75rem;
        height: 2.75rem;
        margin-bottom: -0.25rem;
        border: 1px solid rgba(179, 202, 250, 0.14);
        border-radius: 50%;
        background: rgba(6, 10, 17, 0.94);
        color: rgba(235, 244, 255, 0.9);
        font: 600 1rem/1 var(--font-mono);
        cursor: pointer;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    .contact-stack.is-contact-open .contact-panel,
    .contact-stack.is-contact-open .contact-form,
    .contact-stack.is-contact-open .field,
    .contact-stack.is-contact-open .submit-row,
    .contact-stack.is-contact-open .control,
    .contact-stack.is-contact-open .message,
    .contact-stack.is-contact-open .submit,
    .contact-stack.is-contact-open .system-dock--contact,
    .contact-stack.is-contact-open .telemetry,
    .contact-stack.is-contact-open .system-panel {
        inline-size: 100%;
        min-inline-size: 0;
        max-inline-size: 100%;
    }

    .contact-stack.is-contact-open .system-panel {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        margin-top: 0.6rem;
    }
}

@media (max-width: 980px) {
    .stage {
        place-items: start center;
        padding: 4.5rem clamp(1rem, 4vw, 2rem) 2rem;
    }

    .shell {
        grid-template-columns: minmax(0, 1fr);
        gap: 2rem;
        width: min(100%, 40rem);
        min-width: 0;
    }

    .hero,
    .hero-stack,
    .portfolio-entry,
    .contact-stack,
    .contact-panel,
    .system-dock--contact {
        min-width: 0;
        max-width: 100%;
    }

    .hero {
        width: 100%;
        min-height: 0;
    }

    .hero-stack,
    .portfolio-entry {
        width: 100%;
    }

    .contact-stack {
        width: 100%;
        max-width: none;
        justify-self: stretch;
    }

    .contact-panel {
        width: 100%;
    }

    .title {
        width: 100%;
        min-width: 0;
    }

    .title-word {
        max-width: 100%;
        font-size: clamp(5rem, 16vw, 8rem);
    }

    .code-layer {
        width: min(28rem, 72vw);
        opacity: 0.54;
    }

    .code-layer--gamma,
    .code-layer--delta {
        display: none;
    }

    .code-trace {
        width: 110vw;
        opacity: 0.26;
    }
}

@media (max-width: 640px) {
    html {
        scrollbar-gutter: auto;
    }

    .stage {
        padding: 4.25rem 0.85rem 1.25rem;
    }

    .shell {
        width: 100%;
        gap: 1.25rem;
    }

    .hero-stack {
        gap: 1rem;
    }

    .portfolio-entry {
        width: 100%;
        margin-bottom: 0.2rem;
        padding: 0.82rem;
        border-radius: 14px;
    }

    .portfolio-entry-copy {
        min-width: 0;
        padding-inline: 0.08rem;
    }

    .portfolio-role {
        max-width: 100%;
        padding-left: 0;
        font-size: clamp(0.72rem, 3.4vw, 0.84rem);
        letter-spacing: 0.08em;
        overflow-wrap: anywhere;
    }

    .portfolio-intro {
        max-width: 100%;
        font-size: clamp(0.74rem, 3.3vw, 0.84rem);
        overflow-wrap: anywhere;
    }

    .portfolio-nav {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.5rem;
        padding-left: 0;
    }

    .portfolio-nav-button {
        grid-template-columns: auto minmax(0, 1fr) auto;
        min-width: 0;
        min-height: 4rem;
        padding: 0.68rem 0.72rem;
    }

    .portfolio-nav-index {
        display: block;
    }

    .portfolio-nav-copy {
        min-width: 0;
    }

    .portfolio-nav-copy strong {
        font-size: 0.78rem;
    }

    .portfolio-nav-copy small {
        font-size: 0.58rem;
        overflow-wrap: anywhere;
    }

    .title {
        gap: 0.72rem;
        margin-top: 0.15rem;
    }

    .title-word {
        width: fit-content;
        max-width: 100%;
        font-size: clamp(3.9rem, 20vw, 6rem);
        transform: none;
    }

    .title-tail {
        width: fit-content;
        max-width: 100%;
        padding-left: 0.12rem;
        font-size: clamp(0.72rem, 3.8vw, 0.88rem);
        letter-spacing: clamp(0.20em, 1.2vw, 0.34em);
    }

    .decode-hint {
        max-width: 100%;
        min-height: 2.75rem;
        padding: 0.55rem 0.4rem;
        font-size: 0.64rem;
        letter-spacing: 0.09em;
        overflow-wrap: anywhere;
    }

    .decoder-panel {
        width: 100%;
        max-width: 19rem;
        min-width: 0;
        font-size: 0.62rem;
    }

    .contact-stack,
    .contact-panel,
    .contact-form,
    .field,
    .submit-row,
    .control,
    .message,
    .submit {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .contact-panel {
        padding: 0.82rem;
        border-radius: 20px;
    }

    .control,
    .message {
        padding: 0.9rem 0.92rem;
    }

    .message {
        min-height: 7.5rem;
    }

    .system-dock--contact {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .system-dock--contact .telemetry {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        gap: 0.42rem;
        padding: 0.5rem 0.55rem;
    }

    .system-dock--contact .telemetry-mode {
        flex: 1 1 auto;
        min-width: 0;
        max-width: 100%;
        min-height: 2.75rem;
        padding: 0.42rem 0.52rem;
    }

    .telemetry-mode-copy {
        min-width: 0;
    }

    .telemetry-mode-copy small,
    .system-dock--contact .telemetry-text {
        display: none;
    }

    .telemetry-mode::after {
        width: max-content;
        max-width: min(14rem, calc(100vw - 2rem));
        white-space: normal;
        text-align: center;
    }

    .system-dock--contact .telemetry-rev {
        flex: 0 0 auto;
        min-height: 2.75rem;
        padding-left: 0.45rem;
        font-size: 0.62rem;
    }

    .terminal-teaser {
        margin-left: 0.25rem;
        font-size: 0.54rem;
        overflow-wrap: anywhere;
    }

    .system-dock--contact .system-panel,
    .system-dock--contact .revision-panel {
        left: 0;
        right: auto;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        font-size: 0.66rem;
    }

    .terminal-output,
    .terminal-input-row,
    .terminal-input {
        min-width: 0;
        max-width: 100%;
    }

    .terminal-input-row {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .terminal-input {
        font-size: 1rem;
    }

    .terminal-output span {
        overflow-wrap: anywhere;
        word-break: normal;
    }

    .revision-entry {
        grid-template-columns: 4.1rem 1.35rem minmax(0, 1fr);
        gap: 0.35rem;
    }

    .revision-entry > * {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .portfolio-dialog-title {
        padding-right: 2.75rem;
        font-size: clamp(1.45rem, 8vw, 2rem);
    }

    .portfolio-dialog-close {
        position: sticky;
        z-index: 5;
        top: max(0.5rem, env(safe-area-inset-top));
        display: grid;
        place-items: center;
        width: 2.75rem;
        height: 2.75rem;
        margin: 0 0 0.25rem auto;
        background: rgba(6, 10, 17, 0.94);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    .portfolio-dialog-lead,
    .project-summary,
    .about-copy p {
        overflow-wrap: anywhere;
    }

    .project-list,
    .about-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .project-card {
        min-width: 0;
        padding: 0.85rem;
    }

    .project-meta {
        min-width: 0;
        font-size: 0.62rem;
    }

    .stack-list {
        min-width: 0;
    }

    .stack-chip {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .language-switch {
        top: 0.7rem;
        right: 0.7rem;
    }

    .code-layer {
        width: min(24rem, 95vw);
        font-size: 0.64rem;
        line-height: 1.65;
        opacity: 0.40;
    }

    .code-layer--alpha {
        top: 1%;
        left: -7rem;
    }

    .code-layer--beta {
        top: 24%;
        right: -9rem;
    }

    .code-trace {
        top: 40%;
        width: 118vw;
        font-size: 0.60rem;
        opacity: 0.18;
    }

    .ghost-diff {
        max-width: calc(100vw - 1.5rem);
        min-width: 0;
        font-size: 0.56rem;
        white-space: pre-wrap;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 420px) {
    .stage {
        padding-inline: 0.65rem;
    }

    .portfolio-entry {
        padding: 0.7rem;
    }

    .portfolio-nav-button {
        min-height: 3.8rem;
        padding: 0.62rem 0.6rem;
    }

    .portfolio-nav-index {
        display: none;
    }

    .portfolio-nav-copy strong {
        font-size: 0.74rem;
    }

    .portfolio-nav-copy small {
        font-size: 0.55rem;
    }

    .title-word {
        font-size: clamp(3.55rem, 19vw, 5rem);
    }

    .title-tail {
        font-size: 0.72rem;
    }

    .contact-panel {
        padding: 0.7rem;
        border-radius: 18px;
    }

    .control,
    .message {
        padding: 0.84rem 0.86rem;
    }

    .system-dock--contact .telemetry {
        gap: 0.32rem;
        padding: 0.45rem;
    }

    .system-dock--contact .telemetry-mode {
        padding: 0.36rem 0.42rem;
    }

    .system-dock--contact .telemetry-rev {
        padding-left: 0.35rem;
        font-size: 0.58rem;
    }

    .telemetry-mode-enter {
        display: none;
    }

    .terminal-teaser {
        margin-left: 0.1rem;
    }
}

@media (max-width: 360px) {
    .stage {
        padding-inline: 0.5rem;
    }

    .portfolio-entry,
    .contact-panel {
        border-radius: 14px;
    }

    .portfolio-role {
        font-size: 0.7rem;
    }

    .portfolio-intro {
        font-size: 0.72rem;
    }

    .title-word {
        font-size: clamp(3.25rem, 18.5vw, 4.5rem);
    }

    .system-dock--contact .telemetry::before {
        display: none;
    }

    .system-dock--contact .telemetry-rev {
        font-size: 0.55rem;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .stage {
        padding-top: 3.75rem;
        padding-bottom: 1rem;
    }

    .shell {
        gap: 1rem;
    }

    .hero {
        min-height: 0;
    }

    .hero-stack {
        gap: 0.8rem;
    }

    .portfolio-entry {
        margin-bottom: 0;
    }

    .portfolio-nav-button {
        min-height: 3.6rem;
    }

    .message {
        min-height: 5.5rem;
    }

    .portfolio-dialog-card,
    .contact-stack.is-contact-open {
        padding-top: 0.65rem;
        padding-bottom: 0.65rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .portfolio-entry,
    .portfolio-entry::before,
    .portfolio-nav-button--primary,
    .system-dock--contact .telemetry-mode {
        animation: none !important;
    }
}


/* Cipher ↔ terminal visual link */
.code-layer,
.code-trace {
    transition:
        color 420ms ease,
        opacity 420ms ease,
        text-shadow 420ms ease,
        filter 420ms ease;
}

.stage.is-signal-linked .code-layer {
    color: rgba(196, 221, 255, 0.56);
    opacity: 0.90;
    text-shadow:
        0 0 22px rgba(92, 218, 255, 0.20),
        0 0 3px rgba(232, 246, 255, 0.22);
    filter: saturate(1.08) contrast(1.05);
}

.stage.is-signal-linked .code-trace {
    color: rgba(202, 228, 255, 0.62);
    opacity: 0.56;
    text-shadow:
        0 0 24px rgba(90, 222, 255, 0.22),
        0 0 3px rgba(234, 248, 255, 0.24);
}

