@font-face {
    font-family: 'RusJJ Sans';
    src: url('fonts/instrument-sans.woff2') format('woff2');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

html.rj-home {
    color-scheme: dark;
    --rj-bg: #111111;
    --rj-header: #111111f5;
    --rj-text: #f2f2f0;
    --rj-muted: #b8b8b5;
    --rj-line: #383838;
    --rj-hover: #1d1d1d;
    --rj-accent: #ebbb64;
    --rj-button: #ebbb64;
    --rj-button-text: #19140c;
    --rj-button-hover: #f6d594;
    --rj-terminal: #181818;
    --rj-terminal-head: #202020;
    --rj-star: #efdcad78;
    --rj-shadow: #0005;
    --rj-selection: #f5d69b;
    --rj-gutter: clamp(20px, 5vw, 62px);
    --rj-mono: ui-monospace, 'Cascadia Code', 'SFMono-Regular', Consolas, monospace;
    --rj-ease: cubic-bezier(.22, 1, .36, 1);
    scrollbar-color: var(--rj-line) var(--rj-bg);
    scroll-padding-top: 88px;
}
html.rj-home[data-theme="light"] {
    color-scheme: light;
    --rj-bg: #f6f5f1;
    --rj-header: #f6f5f1f5;
    --rj-text: #191919;
    --rj-muted: #535353;
    --rj-line: #d7d2c9;
    --rj-hover: #eeece5;
    --rj-accent: #775016;
    --rj-button: #262320;
    --rj-button-text: #fffaf3;
    --rj-button-hover: #403830;
    --rj-terminal: #fdfcf8;
    --rj-terminal-head: #ebe8df;
    --rj-star: #51493b63;
    --rj-shadow: #43392719;
    --rj-selection: #efca80;
}
.rj-home .rj-page {
    min-height: 100dvh;
    overflow-x: clip;
    color: var(--rj-text);
    background: var(--rj-bg);
    font: 400 1rem/1.65 'RusJJ Sans', system-ui, sans-serif;
}
.rj-page ::selection { color: #19140c; background: var(--rj-selection); }
.rj-page :focus-visible { outline: 2px solid var(--rj-accent); outline-offset: 4px; }
.rj-page [hidden] { display: none !important; }
.rj-page h1, .rj-page h2, .rj-page h3, .rj-page p { margin: 0; }
.rj-page .rj-content:focus { outline: none; }
.rj-page .rj-skip {
    position: fixed;
    z-index: 12;
    top: 8px;
    left: 8px;
    transform: translateY(-180%);
    padding: 8px 14px;
    border-radius: 5px;
    background: var(--rj-button);
    color: var(--rj-button-text);
}
.rj-page .rj-skip:focus { transform: none; }

.rj-page::before {
    position: fixed;
    z-index: 0;
    inset: 0;
    content: '';
    pointer-events: none;
    background:
        radial-gradient(circle at 14% 24%, var(--rj-star) 0 1px, transparent 1.6px) 0 0 / 211px 163px,
        radial-gradient(circle at 78% 74%, var(--rj-star) 0 .8px, transparent 1.45px) 28px 0 / 319px 257px,
        radial-gradient(circle at 46% 57%, var(--rj-star) 0 .8px, transparent 1.4px) 0 35px / 151px 227px;
}
.rj-page.rj-live-stars:not(.rj-still-stars)::before { display: none; }
.rj-page #stars {
    pointer-events: none;
    visibility: hidden;
    opacity: .74;
}
.rj-page.rj-live-stars:not(.rj-still-stars) #stars { visibility: visible; }
.rj-home[data-theme="light"] #stars { filter: grayscale(1) invert(1); opacity: .3; }

.rj-page .rj-shell {
    width: min(100%, 1280px);
    margin-inline: auto;
    padding-inline: var(--rj-gutter);
}
.rj-page .rj-header {
    position: sticky;
    z-index: 3;
    top: 0;
    background: var(--rj-header);
    box-shadow: 0 1px var(--rj-line);
}
.rj-page .rj-header-inner {
    min-height: 70px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 14px;
}
.rj-page .rj-brand {
    justify-self: start;
    font-size: 1.34rem;
    line-height: 1.05;
    letter-spacing: -.06em;
    font-weight: 700;
}
.rj-page .rj-nav { display: flex; gap: clamp(15px, 4vw, 42px); align-items: center; }
.rj-page .rj-nav a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    position: relative;
    color: var(--rj-muted);
    font-size: .91rem;
    font-weight: 610;
}
.rj-page .rj-nav a::after {
    position: absolute;
    inset: auto 0 4px;
    height: 1px;
    content: '';
    background: var(--rj-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s var(--rj-ease);
}
.rj-page .rj-nav a:is(:hover, :focus-visible) { color: var(--rj-text); }
.rj-page .rj-nav a:is(:hover, :focus-visible)::after { transform: scaleX(1); }
.rj-page .rj-controls { display: flex; justify-self: end; gap: 8px; }
.rj-page .rj-control {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    cursor: pointer;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: var(--rj-hover);
    color: var(--rj-text);
    transition: color .2s, transform .24s var(--rj-ease);
}
.rj-page .rj-control:hover { color: var(--rj-accent); }
.rj-page .rj-control:active { transform: scale(.93); }
.rj-page .rj-control svg { width: 19px; height: 19px; }
.rj-page .rj-theme .rj-moon, .rj-home[data-theme="light"] .rj-theme .rj-sun { display: none; }
.rj-home[data-theme="light"] .rj-theme .rj-moon { display: block; }
.rj-page .rj-stars-toggle[aria-pressed="true"] .rj-stars-play,
.rj-page .rj-stars-toggle[aria-pressed="false"] .rj-stars-pause { display: none; }

.rj-page .rj-content, .rj-page .rj-footer { position: relative; z-index: 1; }
.rj-page .rj-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.28fr) minmax(0, .86fr);
    align-items: center;
    gap: clamp(35px, 8vw, 104px);
    padding-block: clamp(65px, 9vw, 125px) clamp(75px, 9vw, 120px);
}
.rj-page .rj-hero h1 {
    margin-left: -.052em;
    font-size: clamp(5.1rem, 13vw, 11rem);
    font-weight: 700;
    line-height: .86;
    letter-spacing: -.086em;
    overflow-wrap: anywhere;
}
.rj-page .rj-role {
    margin-top: clamp(19px, 3vw, 34px);
    color: var(--rj-text);
    font-size: clamp(1rem, 2vw, 1.29rem);
    font-weight: 640;
    line-height: 1.35;
}
.rj-page .rj-intro {
    max-width: 44ch;
    margin-top: 13px;
    color: var(--rj-muted);
    font-size: clamp(1rem, 1.6vw, 1.22rem);
}
.rj-page .rj-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 47px;
    margin-top: 24px;
    padding: 9px 18px;
    border-radius: 6px;
    background: var(--rj-button);
    color: var(--rj-button-text);
    font-weight: 700;
    transition: background .2s, transform .26s var(--rj-ease);
}
.rj-page .rj-button:hover { background: var(--rj-button-hover); }
.rj-page .rj-button:active { transform: scale(.97); }
.rj-page .rj-terminal {
    min-width: 0;
    max-width: 440px;
    width: 100%;
    justify-self: end;
    overflow: hidden;
    border-radius: 9px;
    background: var(--rj-terminal);
    box-shadow: 0 18px 50px var(--rj-shadow), inset 0 0 0 1px var(--rj-line);
    font-family: var(--rj-mono);
}
.rj-page .rj-terminal-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 45px;
    padding-inline: 16px;
    background: var(--rj-terminal-head);
    color: var(--rj-muted);
    font-size: .8rem;
}
.rj-page .rj-terminal-dots { display: flex; gap: 5px; }
.rj-page .rj-terminal-dots i { display: block; width: 8px; height: 8px; border-radius: 50%; background: var(--rj-accent); opacity: .7; }
.rj-page .rj-terminal-dots i:nth-child(2) { opacity: .44; }
.rj-page .rj-terminal-dots i:nth-child(3) { opacity: .25; }
.rj-page .rj-terminal-body { display: grid; gap: 16px; margin: 0; padding: clamp(20px, 3.4vw, 32px); }
.rj-page .rj-terminal-body dt { margin-bottom: 3px; color: var(--rj-muted); font-size: .83rem; }
.rj-page .rj-terminal-body dd { margin: 0; font-size: clamp(1.1rem, 2.2vw, 1.43rem); line-height: 1.35; }
.rj-page .rj-terminal-body code { font-family: inherit; overflow-wrap: anywhere; }
.rj-page .rj-terminal-body div:last-child dd { color: var(--rj-accent); }

.rj-page .rj-section { padding-block: clamp(30px, 5vw, 60px); border-top: 1px solid var(--rj-line); }
.rj-page .rj-section h2 {
    margin-bottom: clamp(15px, 3vw, 28px);
    font-size: clamp(2.2rem, 5.8vw, 4rem);
    line-height: 1;
    letter-spacing: -.058em;
}
.rj-page .rj-project {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr) auto;
    gap: clamp(16px, 3.5vw, 42px);
    align-items: center;
    padding-block: 20px;
}
.rj-page .rj-project + .rj-project { border-top: 1px solid var(--rj-line); }
.rj-page .rj-project h3 { margin-top: 3px; font-size: clamp(1.24rem, 2.6vw, 1.7rem); line-height: 1.17; letter-spacing: -.037em; }
.rj-page .rj-project-type { color: var(--rj-accent); font: 600 .81rem/1.25 var(--rj-mono); }
.rj-page .rj-project-description, .rj-page .rj-about p { color: var(--rj-muted); }
.rj-page .rj-project-link {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    width: fit-content;
    color: var(--rj-accent);
    font-size: .94rem;
    font-weight: 680;
    white-space: nowrap;
    text-decoration: underline transparent;
    text-underline-offset: .3em;
    transition: text-decoration-color .2s;
}
.rj-page .rj-project-link:is(:hover, :focus-visible) { text-decoration-color: currentColor; }
.rj-page .rj-about { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr); gap: 18px; align-items: start; }
.rj-page .rj-about h2 { margin: 0; }
.rj-page .rj-about p { max-width: 47ch; font-size: clamp(1.05rem, 2.3vw, 1.4rem); }
.rj-page .rj-stack { display: flex; flex-wrap: wrap; list-style: none; gap: 8px 18px; margin: 17px 0 0; padding: 0; color: var(--rj-text); font: .88rem/1.5 var(--rj-mono); }
.rj-page .rj-links { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(12px, 3vw, 28px); padding: 0; margin: 0; }
.rj-page .rj-links li { min-width: 0; border-top: 1px solid var(--rj-line); }
.rj-page .rj-link {
    display: flex;
    min-height: 72px;
    align-items: center;
    gap: 11px;
    padding-block: 11px;
    transition: color .2s;
    overflow-wrap: anywhere;
}
.rj-page .rj-link:hover { color: var(--rj-accent); }
.rj-page .rj-link-icon { display: grid; place-items: center; width: 39px; height: 39px; flex: none; border-radius: 7px; background: var(--rj-hover); color: var(--rj-accent); }
.rj-page .rj-link-icon svg { width: 20px; height: 20px; }
.rj-page .rj-link strong, .rj-page .rj-link small { display: block; line-height: 1.3; }
.rj-page .rj-link small { margin-top: 3px; color: var(--rj-muted); font-size: .83rem; }
.rj-page .rj-footer {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px 14px;
    padding-block: 18px 31px;
    color: var(--rj-muted);
    font-size: .84rem;
}

@media (max-width: 760px) {
    .rj-page .rj-hero { grid-template-columns: 1fr; padding-block: 54px 63px; gap: 36px; }
    .rj-page .rj-terminal { justify-self: start; }
    .rj-page .rj-project { grid-template-columns: minmax(0, 1fr) auto; gap: 9px 15px; }
    .rj-page .rj-project-description { grid-column: 1 / -1; grid-row: 2; }
    .rj-page .rj-project-link { grid-column: 2; grid-row: 1; }
    .rj-page .rj-links { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 465px) {
    html.rj-home { scroll-padding-top: 104px; }
    .rj-page .rj-header-inner { grid-template-columns: 1fr auto; min-height: 90px; gap: 1px 9px; padding-block: 5px; }
    .rj-page .rj-controls { grid-column: 2; grid-row: 1; }
    .rj-page .rj-nav { grid-column: 1 / -1; grid-row: 2; gap: 23px; }
    .rj-page .rj-nav a { min-height: 36px; }
    .rj-page .rj-hero { padding-block: 43px 49px; gap: 30px; }
    .rj-page .rj-hero h1 { font-size: clamp(4.35rem, 17vw, 5.2rem); }
    .rj-page .rj-about { grid-template-columns: 1fr; }
    .rj-page .rj-project { display: block; }
    .rj-page .rj-project-description { margin-top: 8px; }
    .rj-page .rj-project-link { margin-top: 3px; }
}
@media (max-width: 330px) {
    .rj-page .rj-links { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: no-preference) {
    .rj-page .rj-hero-copy > *, .rj-page .rj-terminal { animation: rj-reveal .66s var(--rj-ease) both; }
    .rj-page .rj-hero-copy > :nth-child(2) { animation-delay: 65ms; }
    .rj-page .rj-hero-copy > :nth-child(3) { animation-delay: 110ms; }
    .rj-page .rj-hero-copy > :nth-child(4), .rj-page .rj-terminal { animation-delay: 155ms; }
    @keyframes rj-reveal {
        from { opacity: 0; transform: translateY(13px); }
        to { opacity: 1; transform: translateY(0); }
    }
}
@media (prefers-reduced-motion: reduce) {
    .rj-page.rj-live-stars:not(.rj-still-stars)::before { display: block; }
    .rj-page.rj-live-stars:not(.rj-still-stars) #stars { visibility: hidden; }
    .rj-page *, .rj-page *::before, .rj-page *::after { transition: none !important; }
    .rj-page .rj-control:active, .rj-page .rj-button:active { transform: none; }
}
