/*
 * Portfolio experience layer
 * Loaded after the core public styles so these additions can extend the
 * existing visual system without forcing the base files to become larger.
 */

::selection {
    color: var(--surface-black);
    background: var(--accent-cyan);
}

body.command-palette-open {
    overflow: hidden;
}

.page-progress {
    position: fixed;
    top: calc(var(--nav-height) - 1px);
    left: 0;
    right: 0;
    z-index: calc(var(--z-nav) + 1);
    height: 2px;
    overflow: hidden;
    pointer-events: none;
}

.page-progress span {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue), var(--accent-violet));
    box-shadow: 0 0 16px rgba(112, 220, 233, 0.62);
    transform: scaleX(0);
    transform-origin: left center;
    will-change: transform;
}

.public-command-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    font: inherit;
    font-size: 0.88rem;
    cursor: pointer;
    transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.public-command-link:hover {
    color: var(--text-primary);
    border-color: var(--border-active);
    background: rgba(112, 220, 233, 0.06);
}

.public-command-link kbd,
.button-tertiary kbd {
    padding: 2px 6px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid var(--border-soft);
    border-radius: 5px;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.05);
    font-family: inherit;
    font-size: 0.68rem;
    font-weight: 700;
}

/* Hero cockpit */
.hero-section {
    min-height: max(760px, 100svh);
}

.hero-inner {
    grid-template-columns: minmax(0, 1.08fr) minmax(330px, 0.92fr);
    gap: clamp(38px, 6.5vw, 92px);
}

.hero-copy {
    position: relative;
    z-index: 2;
}

.hero-system-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    width: fit-content;
    margin-bottom: 22px;
    color: var(--text-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-system-line__status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-cyan);
}

.hero-system-line__status > span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: 0 0 0 5px rgba(112, 220, 233, 0.08), 0 0 14px rgba(112, 220, 233, 0.75);
    animation: hero-status-pulse 2.2s ease-in-out infinite;
}

.hero-system-line__divider {
    width: 28px;
    height: 1px;
    background: var(--border-active);
}

.hero-name-line {
    position: relative;
    display: inline-block;
    text-wrap: balance;
    text-shadow: 0 0 55px rgba(120, 168, 255, 0.12);
}

.hero-name-line::after {
    content: "";
    position: absolute;
    left: 0.05em;
    right: 0.12em;
    bottom: -0.08em;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue), transparent 88%);
    box-shadow: 0 0 20px rgba(112, 220, 233, 0.34);
    transform: scaleX(0);
    transform-origin: left;
    animation: hero-line-reveal 1.2s 0.35s var(--ease-out) forwards;
}

.hero-title {
    max-width: 20ch;
    text-wrap: balance;
}

.hero-support {
    max-width: 62ch;
}

.hero-actions {
    align-items: center;
}

.button-primary,
.button-secondary,
.button-tertiary {
    position: relative;
    overflow: hidden;
}

.button-primary::before,
.button-secondary::before,
.button-tertiary::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.2), transparent 80%);
    transform: translateX(-130%);
    transition: transform 520ms var(--ease-out);
    pointer-events: none;
}

.button-primary:hover::before,
.button-secondary:hover::before,
.button-tertiary:hover::before {
    transform: translateX(130%);
}

.button-tertiary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 14px;
    color: var(--text-secondary);
    background: transparent;
    border: 1px dashed rgba(112, 220, 233, 0.26);
    border-radius: 999px;
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button-tertiary:hover {
    color: var(--text-primary);
    border-color: rgba(112, 220, 233, 0.62);
    background: rgba(112, 220, 233, 0.045);
}

.hero-visual {
    position: relative;
    perspective: 1200px;
}

.hero-visual::before,
.hero-visual::after {
    content: "";
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    filter: blur(2px);
    pointer-events: none;
}

.hero-visual::before {
    width: 72%;
    aspect-ratio: 1;
    top: -12%;
    right: -14%;
    border: 1px solid rgba(112, 220, 233, 0.13);
    box-shadow: inset 0 0 60px rgba(112, 220, 233, 0.035);
}

.hero-visual::after {
    width: 34%;
    aspect-ratio: 1;
    left: -10%;
    bottom: 6%;
    background: rgba(120, 168, 255, 0.09);
    filter: blur(48px);
}

.hero-portrait-console {
    --spotlight-x: 50%;
    --spotlight-y: 34%;
    --console-rotate-x: 0deg;
    --console-rotate-y: 0deg;
    position: relative;
    width: min(100%, 485px);
    margin-inline: auto;
    overflow: hidden;
    border: 1px solid rgba(152, 190, 255, 0.26);
    border-radius: 14px;
    background:
        radial-gradient(circle at var(--spotlight-x) var(--spotlight-y), rgba(112, 220, 233, 0.14), transparent 34%),
        linear-gradient(145deg, rgba(16, 23, 36, 0.95), rgba(5, 8, 14, 0.94));
    box-shadow: 0 34px 100px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.055), 0 0 0 1px rgba(112, 220, 233, 0.025);
    transform: rotateX(var(--console-rotate-x)) rotateY(var(--console-rotate-y));
    transform-style: preserve-3d;
    transition: transform 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}

.hero-portrait-console:hover {
    border-color: rgba(112, 220, 233, 0.42);
    box-shadow: 0 38px 110px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 0 35px rgba(112, 220, 233, 0.08);
}

.hero-portrait-console::after,
.project-exhibit--enhanced::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    background: radial-gradient(circle at var(--spotlight-x, 50%) var(--spotlight-y, 50%), rgba(112, 220, 233, 0.10), transparent 28%);
    background-size: auto;
    mask-image: none;
    -webkit-mask-image: none;
    opacity: 0;
    transition: opacity 220ms ease;
    pointer-events: none;
}

.hero-portrait-console:hover::after,
.project-exhibit--enhanced:hover::after {
    opacity: 1;
}

.hero-portrait-console > *,
.project-exhibit--enhanced > * {
    position: relative;
    z-index: 1;
}

.hero-portrait-console__topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    padding: 0 15px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-soft);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.66rem;
    letter-spacing: 0.09em;
}

.hero-portrait-console__lights {
    display: inline-flex;
    gap: 5px;
}

.hero-portrait-console__lights i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    opacity: 0.55;
}

.hero-portrait-console__lights i:first-child {
    background: var(--accent-cyan);
    box-shadow: 0 0 9px rgba(112, 220, 233, 0.7);
    opacity: 1;
}

.hero-portrait-console .hero-portrait-wrap {
    position: relative;
    display: block;
    margin: 14px;
    overflow: hidden;
    border-radius: 8px;
    background: var(--surface-deep);
}

.hero-portrait-console .hero-portrait {
    width: 100%;
    height: auto;
    inline-size: 100%;
    block-size: auto;
    aspect-ratio: 1;
    border: 0;
    border-radius: 8px;
    box-shadow: none;
    filter: saturate(0.9) contrast(1.04);
    transition: filter 400ms ease, transform 700ms var(--ease-out);
}

.hero-portrait-console:hover .hero-portrait {
    filter: saturate(1) contrast(1.06);
    transform: scale(1.018);
}

.hero-portrait-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(112, 220, 233, 0.035), transparent 18%, transparent 78%, rgba(3, 4, 6, 0.38)),
        repeating-linear-gradient(180deg, transparent 0 4px, rgba(255, 255, 255, 0.012) 5px);
    pointer-events: none;
}

.hero-portrait-corner {
    position: absolute;
    z-index: 2;
    width: 24px;
    height: 24px;
    border-color: rgba(112, 220, 233, 0.76);
    border-style: solid;
    pointer-events: none;
}

.hero-portrait-corner--tl { top: 12px; left: 12px; border-width: 1px 0 0 1px; }
.hero-portrait-corner--tr { top: 12px; right: 12px; border-width: 1px 1px 0 0; }
.hero-portrait-corner--bl { bottom: 12px; left: 12px; border-width: 0 0 1px 1px; }
.hero-portrait-corner--br { right: 12px; bottom: 12px; border-width: 0 1px 1px 0; }

.hero-scan-line {
    position: absolute;
    z-index: 2;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(112, 220, 233, 0.85), transparent);
    box-shadow: 0 0 12px rgba(112, 220, 233, 0.65);
    opacity: 0.58;
    animation: hero-scan 5.8s ease-in-out infinite;
    pointer-events: none;
}

.hero-runtime {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
    border-top: 1px solid var(--border-soft);
}

.hero-runtime div {
    min-width: 0;
    padding: 13px 15px;
    border-right: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
}

.hero-runtime div:nth-child(2n) {
    border-right: 0;
}

.hero-runtime dt {
    margin-bottom: 5px;
    color: var(--text-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-runtime dd {
    margin: 0;
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 650;
}

.hero-runtime__pulse {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 5px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: 0 0 8px rgba(112, 220, 233, 0.78);
}

.hero-console-line {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 43px;
    padding: 0 15px;
    color: var(--text-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.69rem;
}

.hero-console-line span {
    color: var(--accent-cyan);
}

.hero-console-line i {
    display: inline-block;
    width: 7px;
    height: 1em;
    background: var(--accent-cyan);
    animation: terminal-caret 1s steps(2, jump-none) infinite;
}

.hero-scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 24px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.68rem;
    letter-spacing: 0.09em;
    text-decoration: none;
    text-transform: uppercase;
    transform: translateX(-50%);
}

.hero-scroll-cue i {
    color: var(--accent-cyan);
    animation: scroll-cue 1.8s ease-in-out infinite;
}

/* Value band */
.impact-band {
    position: relative;
    z-index: 3;
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
    background:
        linear-gradient(90deg, rgba(112, 220, 233, 0.035), transparent 36%, rgba(120, 168, 255, 0.035)),
        rgba(6, 9, 14, 0.88);
}

.impact-band__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.impact-band__item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    min-height: 176px;
    padding: 28px 22px;
    border-right: 1px solid var(--border-soft);
    transition: background 220ms ease;
}

.impact-band__item:last-child {
    border-right: 0;
}

.impact-band__item:hover {
    background: rgba(112, 220, 233, 0.035);
}

.impact-band__index,
.project-exhibit__index {
    color: var(--accent-cyan);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.66rem;
    letter-spacing: 0.08em;
}

.impact-band__item h2 {
    margin: 0 0 8px;
    font-size: 0.95rem;
    line-height: 1.25;
}

.impact-band__item p {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.55;
}

/* Project records */
.work-section {
    overflow: clip;
}

.work-section::before {
    content: "";
    position: absolute;
    width: min(70vw, 920px);
    aspect-ratio: 1;
    top: 5%;
    left: -38%;
    border: 1px solid rgba(112, 220, 233, 0.055);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(120, 168, 255, 0.055), transparent 66%);
    pointer-events: none;
}

.work-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.56fr);
    gap: clamp(24px, 6vw, 76px);
    max-width: none;
    align-items: end;
}

.work-heading > p {
    margin: 0 0 8px;
    font-size: 0.96rem;
}

.project-grid--enhanced {
    gap: 22px;
}

.project-exhibit--enhanced {
    --spotlight-x: 50%;
    --spotlight-y: 30%;
    padding: 0;
    border-radius: 12px;
    background:
        radial-gradient(circle at var(--spotlight-x) var(--spotlight-y), rgba(112, 220, 233, 0.08), transparent 34%),
        linear-gradient(145deg, rgba(13, 18, 30, 0.96), rgba(6, 9, 15, 0.94));
}

.project-exhibit--enhanced::before {
    display: none;
}

.project-exhibit__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    padding: 0 16px;
    border-bottom: 1px solid var(--border-soft);
}

.project-exhibit__status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.62rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.project-exhibit__status i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: 0 0 8px rgba(112, 220, 233, 0.65);
}

.project-exhibit__media {
    position: relative;
    display: block;
    overflow: hidden;
    margin: 14px 14px 0;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--surface-deep);
}

.project-exhibit__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(3, 4, 6, 0.55));
    pointer-events: none;
}

.project-exhibit__media img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform 700ms var(--ease-out), filter 400ms ease;
}

.project-exhibit__media:hover img {
    transform: scale(1.035);
    filter: saturate(1.08);
}

.project-exhibit__media-action {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    color: var(--surface-black);
    background: rgba(244, 247, 251, 0.9);
    border-radius: 50%;
    transform: translateY(5px);
    opacity: 0;
    transition: transform 220ms var(--ease-out), opacity 220ms ease;
}

.project-exhibit__media:hover .project-exhibit__media-action,
.project-exhibit__media:focus-visible .project-exhibit__media-action {
    transform: translateY(0);
    opacity: 1;
}

.project-exhibit__body {
    padding: 22px;
}

.project-exhibit__body > p:not(.project-category) {
    min-height: 3.4em;
}

.project-record {
    margin-top: 20px;
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
}

.project-record summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    color: var(--text-primary);
    cursor: pointer;
    list-style: none;
    font-size: 0.86rem;
    font-weight: 700;
}

.project-record summary::-webkit-details-marker {
    display: none;
}

.project-record summary i {
    color: var(--accent-cyan);
    transition: transform 220ms var(--ease-out);
}

.project-record[open] summary i {
    transform: rotate(45deg);
}

.project-record__content {
    display: grid;
    gap: 16px;
    padding: 0 0 18px;
}

.project-record__content div {
    padding-left: 13px;
    border-left: 1px solid rgba(112, 220, 233, 0.26);
}

.project-record__content h4 {
    margin: 0 0 5px;
    color: var(--accent-cyan);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.64rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.project-record__content p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.55;
}

/* Command palette */
.command-palette {
    position: fixed;
    inset: 0;
    z-index: 110;
    display: grid;
    align-items: start;
    justify-items: center;
    padding: min(12vh, 110px) 18px 32px;
}

.command-palette[hidden] {
    display: none;
}

.command-palette__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    background: rgba(1, 2, 4, 0.76);
    border: 0;
    backdrop-filter: blur(16px) saturate(0.8);
    -webkit-backdrop-filter: blur(16px) saturate(0.8);
    cursor: default;
}

.command-palette__panel {
    position: relative;
    width: min(680px, 100%);
    max-height: min(730px, calc(100svh - 120px));
    overflow: hidden;
    color: var(--text-primary);
    background:
        linear-gradient(rgba(112, 220, 233, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(112, 220, 233, 0.02) 1px, transparent 1px),
        rgba(8, 12, 19, 0.985);
    background-size: 32px 32px, 32px 32px, auto;
    border: 1px solid rgba(112, 220, 233, 0.28);
    border-radius: 14px;
    box-shadow: 0 40px 130px rgba(0, 0, 0, 0.62), 0 0 70px rgba(112, 220, 233, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.045);
    animation: command-panel-in 260ms var(--ease-out) both;
}

.command-palette__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px 14px;
}

.command-palette__eyebrow {
    margin: 0 0 4px;
    color: var(--accent-cyan);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.64rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.command-palette__header h2 {
    margin: 0;
    font-size: 1.45rem;
    line-height: 1.1;
}

.command-palette kbd {
    padding: 4px 7px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-soft);
    border-radius: 5px;
    font-family: inherit;
    font-size: 0.66rem;
    font-weight: 700;
}

.command-palette__search {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 14px 10px;
    padding: 0 14px;
    color: var(--accent-cyan);
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border-soft);
    border-radius: 9px;
}

.command-palette__search:focus-within {
    border-color: rgba(112, 220, 233, 0.46);
    box-shadow: 0 0 0 3px rgba(112, 220, 233, 0.06);
}

.command-palette__search input {
    width: 100%;
    min-height: 52px;
    padding: 0;
    color: var(--text-primary);
    background: transparent;
    border: 0;
    outline: 0;
    font: inherit;
}

.command-palette__search input::placeholder {
    color: var(--text-muted);
}

.command-palette__results [hidden] {
    display: none !important;
}

.command-palette__results {
    max-height: min(480px, calc(100svh - 300px));
    overflow-y: auto;
    padding: 4px 10px 10px;
    scrollbar-color: rgba(112, 220, 233, 0.26) transparent;
    scrollbar-width: thin;
}

.command-palette__results a {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 11px 10px;
    color: var(--text-secondary);
    border: 1px solid transparent;
    border-radius: 9px;
    text-decoration: none;
}

.command-palette__results a:hover,
.command-palette__results a.is-selected {
    color: var(--text-primary);
    background: rgba(112, 220, 233, 0.055);
    border-color: rgba(112, 220, 233, 0.15);
}

.command-palette__icon {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    color: var(--accent-cyan);
    background: rgba(112, 220, 233, 0.055);
    border: 1px solid rgba(112, 220, 233, 0.13);
    border-radius: 8px;
}

.command-palette__results strong,
.command-palette__results small {
    display: block;
}

.command-palette__results strong {
    margin-bottom: 2px;
    color: inherit;
    font-size: 0.9rem;
}

.command-palette__results small {
    overflow: hidden;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.command-palette__empty {
    margin: 0;
    padding: 28px;
    text-align: center;
    font-size: 0.9rem;
}

.command-palette__footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    min-height: 44px;
    padding: 8px 16px;
    color: var(--text-muted);
    border-top: 1px solid var(--border-soft);
    font-size: 0.68rem;
}

.command-palette__footer span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Global pointer glow on precise pointing devices */
.portfolio-cursor-glow {
    position: fixed;
    z-index: 1;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(112, 220, 233, 0.04), transparent 68%);
    transform: translate3d(-50%, -50%, 0);
    opacity: 0;
    pointer-events: none;
    will-change: left, top, opacity;
    transition: opacity 220ms ease;
}

.portfolio-cursor-glow.is-visible {
    opacity: 1;
}

@keyframes hero-status-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.76); opacity: 0.62; }
}

@keyframes hero-line-reveal {
    to { transform: scaleX(1); }
}

@keyframes hero-scan {
    0%, 8% { top: 2%; opacity: 0; }
    18% { opacity: 0.55; }
    72% { opacity: 0.55; }
    86%, 100% { top: 98%; opacity: 0; }
}

@keyframes terminal-caret {
    0%, 44% { opacity: 1; }
    45%, 100% { opacity: 0; }
}

@keyframes scroll-cue {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}

@keyframes command-panel-in {
    from { opacity: 0; transform: translateY(-12px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 1040px) {
    .public-command-link kbd {
        display: none;
    }

    .impact-band__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .impact-band__item:nth-child(2) {
        border-right: 0;
    }

    .impact-band__item:nth-child(-n + 2) {
        border-bottom: 1px solid var(--border-soft);
    }
}

@media (max-width: 860px) {
    .public-command-link {
        justify-content: flex-start;
        width: 100%;
        padding: 9px 0;
        background: transparent;
        border: 0;
        border-radius: 0;
    }

    .hero-section {
        min-height: auto;
    }

    .hero-inner {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        order: -1;
        width: min(100%, 400px);
        margin-inline: auto;
    }

    .hero-portrait-wrap {
        order: initial;
        opacity: 1;
    }

    .hero-portrait-console {
        width: 100%;
    }

    .hero-system-line {
        margin-bottom: 16px;
    }

    .hero-scroll-cue {
        display: none;
    }

    .work-heading {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .work-heading > p {
        max-width: 60ch;
    }

    .portfolio-cursor-glow {
        display: none;
    }
}

@media (max-width: 620px) {
    .impact-band__grid {
        grid-template-columns: 1fr;
    }

    .impact-band__item {
        min-height: auto;
        padding: 22px 8px;
        border-right: 0;
        border-bottom: 1px solid var(--border-soft);
    }

    .impact-band__item:last-child {
        border-bottom: 0;
    }

    .hero-system-line__divider,
    .hero-system-line > span:last-child {
        display: none;
    }

    .hero-actions .button-tertiary {
        width: 44px;
        padding: 0;
    }

    .hero-actions .button-tertiary span,
    .hero-actions .button-tertiary kbd {
        display: none;
    }

    .hero-runtime {
        grid-template-columns: 1fr;
    }

    .hero-runtime div,
    .hero-runtime div:nth-child(2n) {
        border-right: 0;
    }

    .command-palette {
        padding: 12px;
        align-items: end;
    }

    .command-palette__panel {
        max-height: calc(100svh - 24px);
        border-radius: 14px;
    }

    .command-palette__results {
        max-height: calc(100svh - 270px);
    }

    .command-palette__results small {
        max-width: 52vw;
    }

    .command-palette__footer {
        gap: 10px;
    }

    .command-palette__footer span:last-child {
        display: none;
    }

    .project-exhibit__body {
        padding: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-system-line__status > span,
    .hero-scan-line,
    .hero-console-line i,
    .hero-scroll-cue i,
    .hero-name-line::after {
        animation: none !important;
    }

    .hero-name-line::after {
        transform: scaleX(1);
    }

    .hero-portrait-console {
        transform: none !important;
    }
}
