@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
    color-scheme: dark;
    font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

.skip-link {
    background: #c3e88d;
    color: #11131a;
    font-weight: 700;
    left: 1rem;
    padding: 0.65rem 0.9rem;
    position: fixed;
    top: 1rem;
    transform: translateY(-200%);
    transition: transform 120ms ease;
    z-index: 100;
}

.skip-link:focus {
    transform: translateY(0);
}

body {
    background: #0d1211;
    color: #d8dee9;
}

button,
input {
    font: inherit;
}

button {
    color: inherit;
}

.site-shell {
    --accent: #c3e88d;
    --accent-rgb: 195, 232, 141;
    --border-subtle: #28302c;
    --fg-bright: #f1f5f2;
    --fg: #c7cfca;
    --fg-dim: #89938d;
    --fg-faint: #76807a;
    --page-bg: #0d1211;
    --terminal-bg: #080b0a;
    align-items: center;
    background: var(--page-bg);
    color: var(--fg);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: clamp(1.5rem, 5vh, 3rem) clamp(1.5rem, 4vw, 3rem);
    position: relative;
    transition: background 300ms ease;
}

.site-shell.theme-amber {
    --accent: #ffc85a;
    --accent-rgb: 255, 200, 90;
}

.terminal-window {
    background: var(--terminal-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    height: min(820px, calc(100dvh - 3rem));
    max-width: 1150px;
    min-height: min(680px, calc(100dvh - 3rem));
    overflow: hidden;
    position: relative;
    width: 100%;
}

.terminal-window::after {
    content: none;
}

.accent,
.heading {
    color: var(--fg-bright);
}

.iterm-header {
    align-items: center;
    background: linear-gradient(#333438, #28292d);
    border-bottom: 1px solid #08090c;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
    display: flex;
    height: 38px;
    padding: 0 10px;
    position: relative;
    user-select: none;
}

.traffic-lights {
    display: flex;
    gap: 8px;
    margin: 0 18px 0 2px;
}

.traffic-lights span {
    border-radius: 50%;
    box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.35);
    height: 12px;
    width: 12px;
}

.traffic-lights .close { background: var(--accent); }
.traffic-lights .minimize { background: #777d79; }
.traffic-lights .maximize { background: #555b57; }

.terminal-tab {
    align-items: center;
    align-self: flex-end;
    background: #191b22;
    border-left: 1px solid #111217;
    border-radius: 5px 5px 0 0;
    border-right: 1px solid #111217;
    color: #c5c8d0;
    display: flex;
    font-size: 0.68rem;
    gap: 0.65rem;
    height: 31px;
    min-width: 250px;
    padding: 0 1rem;
}

.tab-symbol {
    color: var(--accent);
    font-weight: 700;
}

.new-tab {
    background: transparent;
    border: 0;
    color: #96989e;
    cursor: pointer;
    font-size: 1rem;
    height: 100%;
    padding: 0 0.8rem;
}

.header-title {
    color: #a8a9ad;
    font-size: 0.68rem;
    left: 50%;
    pointer-events: none;
    position: absolute;
    transform: translateX(-50%);
}

.workspace {
    height: calc(100% - 70px);
}

.terminal {
    font-size: clamp(0.72rem, 1.1vw, 0.88rem);
    height: 100%;
    line-height: 1.7;
    overflow-x: hidden;
    overflow-y: auto;
    padding: clamp(1.25rem, 3vw, 2.5rem);
    scrollbar-color: rgba(var(--accent-rgb), 0.25) transparent;
    scrollbar-width: thin;
}

.session-intro {
    color: var(--fg-dim);
    margin-bottom: 1.75rem;
}

.login-line {
    color: var(--fg-faint);
}

.identity-line {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    margin: 0.7rem 0;
}

.identity-line strong {
    color: var(--fg-bright);
    font-size: 1.08em;
}

.identity-line span,
.intro-hint {
    color: var(--fg-dim);
}

.session-intro a,
.inline-command,
.output-link,
.output-command {
    background: none;
    border: 0;
    color: var(--accent);
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    text-underline-offset: 3px;
}

.session-intro a:hover,
.session-intro a:focus-visible,
.inline-command:hover,
.inline-command:focus-visible,
.output-link:hover,
.output-link:focus-visible,
.output-command:hover,
.output-command:focus-visible {
    outline: none;
    text-decoration: underline;
}

.intro-hint a {
    text-decoration: underline;
    text-decoration-color: rgba(var(--accent-rgb), 0.55);
}

.output-link {
    display: inline-block;
}

.history-entry {
    margin: 0.8rem 0 1.2rem;
}

.prompt-row {
    align-items: center;
    display: flex;
    min-width: 0;
}

.prompt {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    margin-right: 0.55rem;
    white-space: nowrap;
}

.power-segment {
    align-items: center;
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 500;
    height: 1.8rem;
    line-height: 1;
    padding: 0 0.72rem 0 0.62rem;
    position: relative;
}

.power-segment::after {
    border-bottom: 0.9rem solid transparent;
    border-left: 0.55rem solid;
    border-top: 0.9rem solid transparent;
    content: "";
    position: absolute;
    right: -0.55rem;
    top: 0;
    z-index: 2;
}

.context-segment {
    background: rgba(var(--accent-rgb), 0.13);
    color: var(--accent);
    padding-left: 0.6rem;
    z-index: 3;
}

.context-segment::after { border-left-color: rgba(var(--accent-rgb), 0.13); }

.context-segment b {
    font-size: 0.68rem;
    margin-right: 0.4rem;
}

.path-segment {
    background: #252c28;
    color: var(--fg-dim);
    padding-left: 1.1rem;
    z-index: 2;
}

.path-segment::after { border-left-color: #252c28; }

.prompt-symbol {
    color: var(--fg-dim);
    font-size: 1.15rem;
    font-weight: 700;
    margin-left: 0.95rem;
}

.executed-command {
    color: var(--fg-bright);
    overflow-wrap: anywhere;
}

.output-line {
    color: var(--fg);
    min-height: 1.65em;
    overflow-wrap: anywhere;
    padding-left: 1rem;
    white-space: pre-wrap;
}

.output-line.heading {
    font-weight: 600;
    letter-spacing: 0.08em;
    margin-top: 0.35rem;
}

.output-line.help-heading {
    color: var(--fg-bright);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    margin-top: 0.25rem;
}

.output-line.help-row {
    color: var(--fg-dim);
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 18ch minmax(0, 1fr);
    min-height: 1.7em;
    white-space: normal;
}

.output-line.help-link {
    position: relative;
}

.output-line.help-link::before {
    color: var(--accent);
    content: ">";
    left: 0;
    position: absolute;
}

.help-command {
    justify-self: start;
}

.output-line.help-link .help-command {
    color: var(--fg);
}

.help-description {
    color: var(--fg-dim);
}

.output-line.error {
    color: #ff806d;
}

.match-highlight {
    background: transparent;
    color: var(--accent);
    font: inherit;
    font-weight: 700;
}

.output-line.trace-line {
    display: grid;
    gap: 1ch;
    grid-template-columns: minmax(18ch, 1fr) auto 8ch;
    white-space: pre;
}

.trace-label {
    overflow: hidden;
    text-overflow: ellipsis;
}

.trace-bar {
    color: var(--accent);
}

.trace-duration {
    color: var(--fg-dim);
    text-align: right;
}

.output-line.trace-attribute,
.output-line.trace-summary {
    color: var(--fg-dim);
}

.command-input {
    background: transparent;
    border: 0;
    caret-color: transparent;
    color: var(--fg-bright);
    field-sizing: content;
    flex: 0 0 auto;
    min-width: 1ch;
    outline: none;
    padding: 0;
}

.cursor {
    animation: blink 1s steps(1) infinite;
    background: var(--accent);
    box-shadow: 0 0 7px rgba(var(--accent-rgb), 0.55);
    display: block;
    height: 1.05em;
    margin-left: -1px;
    width: 0.52em;
}

.command-input:not(:focus) + .cursor {
    opacity: 0.25;
}

.command-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 1.25rem 0 0 1rem;
}

.command-chips button {
    align-items: center;
    background: rgba(var(--accent-rgb), 0.1);
    border: 1px solid rgba(var(--accent-rgb), 0.52);
    border-radius: 6px;
    color: var(--accent);
    cursor: pointer;
    display: inline-flex;
    font-size: 0.76rem;
    justify-content: center;
    min-height: 44px;
    padding: 0.65rem 0.9rem;
}

.command-chips button:hover,
.command-chips button:focus-visible {
    background: rgba(var(--accent-rgb), 0.14);
    border-color: var(--accent);
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.neofetch-output {
    align-items: start;
    color: var(--fg);
    display: grid;
    gap: clamp(1.5rem, 4vw, 3.5rem);
    grid-template-columns: auto minmax(0, 1fr);
    margin: 0.25rem 0 0.5rem 1rem;
    max-width: 58rem;
}

.neofetch-mark {
    color: var(--fg-faint);
    font: inherit;
    line-height: 1.7;
    margin: 0;
}

.neofetch-info {
    min-width: 0;
}

.neofetch-info > div:not(.neofetch-owner):not(.neofetch-rule) {
    display: grid;
    gap: 1rem;
    grid-template-columns: 14ch minmax(0, 1fr);
}

.neofetch-info span {
    color: var(--fg-dim);
    text-align: right;
}

.neofetch-info strong {
    color: var(--fg);
    font-weight: 400;
}

.neofetch-owner {
    color: var(--fg-bright);
    font-weight: 600;
}

.neofetch-rule {
    background: var(--border-subtle);
    height: 1px;
    margin: 0.2rem 0 0.35rem;
    max-width: 36rem;
}

.neofetch-info a {
    color: var(--accent);
    display: inline-block;
    margin: 0.35rem 0 0 15ch;
    text-decoration: none;
}

.neofetch-info a:hover,
.neofetch-info a:focus-visible {
    outline: none;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.terminal-footer {
    align-items: center;
    background: #191b22;
    border-top: 1px solid #272a36;
    color: #9299aa;
    display: flex;
    font-size: 0.52rem;
    gap: 1.5rem;
    height: 32px;
    letter-spacing: 0.08em;
    padding: 0 1rem;
}

.not-found-terminal {
    font-size: clamp(0.78rem, 1.2vw, 0.95rem);
    line-height: 1.7;
    padding: clamp(2rem, 7vw, 6rem);
}

.not-found-error {
    color: #ff757f;
    margin: 1.25rem 0 0 1rem;
}

.not-found-code {
    color: #9299aa;
    margin: 0 0 2rem 1rem;
}

.not-found-link {
    color: #c3e88d;
    font-weight: 700;
    text-decoration: none;
}

.not-found-link:hover,
.not-found-link:focus-visible {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.semantic-fallback {
    border: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.semantic-fallback:focus-within {
    background: #0f111a;
    clip: auto;
    clip-path: none;
    height: auto;
    inset: 0;
    margin: 0;
    overflow: auto;
    padding: 2rem;
    white-space: normal;
    width: auto;
    z-index: 20;
}

.semantic-fallback:target {
    background: #0f111a;
    clip: auto;
    clip-path: none;
    height: auto;
    inset: 0;
    margin: 0;
    overflow: auto;
    padding: 2rem;
    white-space: normal;
    width: auto;
    z-index: 20;
}

.static-page {
    margin: 0 auto;
    max-width: 74rem;
    min-height: 100vh;
    padding: clamp(1.25rem, 5vw, 4rem);
}

.noscript-content {
    background: #0f111a;
}

.static-page a,
.semantic-fallback a {
    color: #c3e88d;
    text-underline-offset: 0.2em;
}

.static-page a:focus-visible,
.semantic-fallback a:focus-visible {
    outline: 2px solid #82aaff;
    outline-offset: 0.25rem;
}

.portfolio-nav {
    align-items: center;
    border-bottom: 1px solid #2f3442;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    margin-bottom: clamp(2rem, 6vw, 5rem);
    padding-bottom: 1rem;
}

.portfolio-nav a {
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
}

.terminal-kicker,
.eyebrow,
.project-stack {
    color: #aab1c3;
    font-size: 0.82rem;
}

.terminal-kicker {
    margin-bottom: 2.5rem;
}

.terminal-kicker span,
.eyebrow {
    color: #c3e88d;
}

.static-page h1 {
    font-size: clamp(2.4rem, 8vw, 5.5rem);
    letter-spacing: -0.06em;
    line-height: 0.95;
    margin: 0 0 1.5rem;
    max-width: 12ch;
}

.static-page h2 {
    color: #c3e88d;
    font-size: clamp(1.35rem, 3vw, 2rem);
    margin: 0 0 1.5rem;
}

.static-page h3 {
    font-size: 1rem;
    margin: 0 0 0.5rem;
}

.static-page h4 {
    color: #aab1c3;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.static-page section,
.page-intro,
.case-study {
    margin-bottom: clamp(3.5rem, 8vw, 7rem);
}

.static-page p,
.static-page li,
.static-page dd {
    color: #b8c0d4;
    line-height: 1.75;
}

.lede {
    color: #d8dee9 !important;
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    max-width: 48rem;
}

.resume-list,
.project-list {
    display: grid;
    gap: 1px;
}

.resume-list article,
.project-list article {
    background: #151821;
    border-left: 2px solid #343b4d;
    padding: clamp(1.25rem, 3vw, 2rem);
}

.project-list {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 25rem), 1fr));
}

.stack-list,
.contact-list {
    display: grid;
    gap: 0.75rem 2rem;
    grid-template-columns: minmax(8rem, 0.3fr) 1fr;
    margin: 0;
}

.stack-list dt,
.contact-list dt {
    color: #c3e88d;
    font-weight: 700;
}

.stack-list dd,
.contact-list dd {
    margin: 0;
}

.timeline-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.timeline-list li {
    border-left: 1px solid #3d465b;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 4rem 1fr;
    padding: 0 0 2.5rem 1.5rem;
    position: relative;
}

.timeline-list li::before {
    background: #c3e88d;
    border-radius: 50%;
    content: "";
    height: 0.55rem;
    left: -0.3rem;
    position: absolute;
    top: 0.55rem;
    width: 0.55rem;
}

.timeline-list span {
    color: #aab1c3;
    display: block;
    margin-top: 0.25rem;
}

.primary-link {
    border: 1px solid #c3e88d;
    display: inline-block;
    padding: 0.75rem 1rem;
    text-decoration: none;
}

kbd {
    color: #aeb4c2;
    font-family: inherit;
}

.footer-location {
    color: var(--accent);
    margin-left: auto;
}

@keyframes blink {
    0%, 48% { opacity: 1; }
    49%, 100% { opacity: 0; }
}

@media (max-width: 720px) {
    .site-shell {
        padding: 0;
    }

    .terminal-window {
        border: 0;
        height: 100dvh;
        min-height: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .workspace {
        height: calc(100% - 70px);
    }

    .terminal {
        height: 100%;
        padding: 1.5rem 1rem 2rem;
    }

    .header-title,
    .new-tab {
        display: none;
    }

    .terminal-tab {
        flex: 1;
        min-width: 0;
    }

    .traffic-lights {
        margin-right: 12px;
    }

    .power-segment {
        font-size: 0.62rem;
        height: 1.7rem;
        padding-left: 0.55rem;
        padding-right: 0.7rem;
    }

    .path-segment {
        padding-left: 1.05rem;
    }

    .prompt {
        margin-right: 0.35rem;
    }

    .prompt-symbol {
        margin-left: 0.8rem;
    }

    .context-segment b,
    .context-segment {
        font-size: 0;
    }

    .context-segment b {
        font-size: 0.62rem;
        margin: 0;
    }

    .terminal-footer span:nth-child(2),
    .terminal-footer span:nth-child(3) {
        display: none;
    }

    .stack-list,
    .contact-list {
        grid-template-columns: 1fr;
    }

    .neofetch-output {
        gap: 0.5rem;
        grid-template-columns: 1fr;
    }

    .neofetch-mark {
        display: none;
    }

    .neofetch-info > div:not(.neofetch-owner):not(.neofetch-rule) {
        gap: 0.75rem;
        grid-template-columns: 12ch minmax(0, 1fr);
    }

    .neofetch-info a {
        margin-left: 13ch;
    }

    .output-line.help-row {
        gap: 0 0.75rem;
        grid-template-columns: minmax(0, 1fr);
        margin-bottom: 0.35rem;
    }

    .help-description {
        padding-left: 1rem;
    }

    .output-line.trace-line {
        gap: 0.5ch;
        grid-template-columns: minmax(0, 1fr) auto;
        white-space: pre-wrap;
    }

    .trace-label {
        overflow: visible;
        text-overflow: clip;
    }

    .trace-bar {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }
}

@media (prefers-contrast: more) {
    .site-shell,
    .static-page,
    .semantic-fallback:target,
    .semantic-fallback:focus-within {
        --accent: #d9ff9f;
        --accent-rgb: 217, 255, 159;
        --fg-bright: #ffffff;
        --fg: #e7ebf4;
    }

    .output-line,
    .session-intro,
    .static-page p,
    .static-page li,
    .static-page dd {
        color: #e7ebf4;
    }

    .command-chips button,
    .resume-list article,
    .project-list article {
        border-color: #c7cedd;
    }
}
