:root {
    --bg: #080a0f;
    --bg-soft: #0d1017;
    --panel: rgba(17, 21, 30, 0.78);
    --panel-solid: #11151e;
    --line: rgba(173, 186, 205, 0.15);
    --line-strong: rgba(173, 186, 205, 0.26);
    --text: #edf1f6;
    --muted: #8f99aa;
    --dim: #5c6677;
    --accent: #a5f26b;
    --accent-strong: #c2ff91;
    --accent-wash: rgba(165, 242, 107, 0.1);
    --blue: #7fcbff;
    --mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;
    --display: 'Space Grotesk', 'DM Sans', sans-serif;
    --body: 'DM Sans', system-ui, sans-serif;
    --max-width: 1180px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 92px;
}

body {
    min-width: 320px;
    background: var(--bg);
    color: var(--text);
    font-family: var(--body);
    line-height: 1.6;
    overflow-x: hidden;
}

::selection {
    background: var(--accent);
    color: #11150d;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

button {
    border: 0;
}

#ambient-canvas,
.grid-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

#ambient-canvas {
    opacity: 0.72;
}

.grid-overlay {
    opacity: 0.34;
    background-image: linear-gradient(rgba(146, 160, 181, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(146, 160, 181, 0.06) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(to bottom, black 0%, transparent 72%);
}

.page-shell {
    margin: 0 auto;
    position: relative;
    width: min(100% - 48px, var(--max-width));
    z-index: 1;
}

.site-header {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    min-height: 76px;
}

.brand,
.site-nav,
.hero-actions,
.availability,
.card-topbar,
.profile-intro,
.card-footer,
.project-card-header,
.project-card-footer,
.tags,
.site-footer,
.terminal-topbar,
.terminal-live,
.command-list,
.text-link,
.project-link {
    align-items: center;
    display: flex;
}

.brand {
    color: var(--text);
    font-family: var(--mono);
    font-size: 0.88rem;
    font-weight: 600;
    gap: 10px;
    letter-spacing: -0.02em;
}

.brand-mark {
    align-items: center;
    background: var(--accent);
    color: #0c1208;
    display: inline-flex;
    font-size: 0.76rem;
    font-weight: 600;
    height: 24px;
    justify-content: center;
    letter-spacing: -0.1em;
    padding-right: 2px;
    width: 30px;
}

.site-nav {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.72rem;
    gap: clamp(18px, 3.1vw, 42px);
    letter-spacing: 0.01em;
}

.site-nav a,
.site-footer a,
.text-link,
.project-link {
    transition: color 180ms ease;
}

.site-nav a:hover,
.site-footer a:hover,
.text-link:hover,
.project-link:hover {
    color: var(--accent);
}

.nav-github {
    border: 1px solid var(--line-strong);
    color: var(--text) !important;
    gap: 8px;
    padding: 8px 12px;
    transition: background 180ms ease, border-color 180ms ease, color 180ms ease !important;
}

.nav-github:hover {
    background: var(--accent-wash);
    border-color: rgba(165, 242, 107, 0.48);
    color: var(--accent) !important;
}

.section-pad {
    padding-bottom: 116px;
    padding-top: 116px;
}

.hero {
    align-items: center;
    display: grid;
    gap: clamp(48px, 8vw, 120px);
    grid-template-columns: minmax(0, 1.04fr) minmax(390px, 0.96fr);
    min-height: 650px;
    padding-bottom: 112px;
    padding-top: 104px;
}

.eyebrow {
    align-items: center;
    color: var(--muted);
    display: flex;
    font-family: var(--mono);
    font-size: 0.68rem;
    gap: 9px;
    letter-spacing: 0.13em;
    margin-bottom: 24px;
    text-transform: uppercase;
}

.eyebrow-mark {
    background: var(--accent);
    box-shadow: 0 0 12px rgba(165, 242, 107, 0.55);
    display: inline-block;
    height: 6px;
    width: 6px;
}

.hero h1,
.section-heading h2,
.contact-card h2 {
    font-family: var(--display);
    font-weight: 600;
    letter-spacing: -0.065em;
    line-height: 1.04;
}

.hero h1 {
    font-size: clamp(3.5rem, 6.8vw, 6rem);
    max-width: 680px;
}

.hero h1 em {
    color: var(--accent);
    font-style: normal;
}

.hero-lede {
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.8;
    margin-top: 30px;
    max-width: 540px;
}

.hero-lede span {
    color: #c2cad5;
    font-family: var(--mono);
    font-size: 0.84rem;
}

.hero-actions {
    gap: 12px;
    margin-top: 36px;
}

.button {
    align-items: center;
    display: inline-flex;
    font-family: var(--mono);
    font-size: 0.74rem;
    gap: 12px;
    justify-content: center;
    padding: 13px 17px;
    transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button-primary {
    background: var(--accent);
    color: #10160b;
    font-weight: 600;
}

.button-primary:hover {
    background: var(--accent-strong);
}

.button-ghost {
    border: 1px solid var(--line-strong);
    color: var(--muted);
}

.button-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.availability {
    color: var(--dim);
    font-family: var(--mono);
    font-size: 0.66rem;
    gap: 8px;
    margin-top: 24px;
}

.availability-dot,
.project-status i,
.footer-signal,
.terminal-live i {
    background: var(--accent);
    border-radius: 50%;
    display: inline-block;
    height: 6px;
    width: 6px;
}

.availability-dot {
    box-shadow: 0 0 0 4px rgba(165, 242, 107, 0.08), 0 0 14px var(--accent);
}

.hero-visual {
    min-height: 430px;
    position: relative;
}

.profile-card {
    background: linear-gradient(135deg, rgba(21, 27, 38, 0.95), rgba(12, 16, 24, 0.88));
    border: 1px solid var(--line-strong);
    box-shadow: 24px 28px 0 rgba(3, 5, 8, 0.24), 0 24px 80px rgba(0, 0, 0, 0.3);
    left: 50%;
    max-width: 450px;
    position: absolute;
    top: 14px;
    transform: translateX(-50%) rotate(2.2deg);
    width: 100%;
    z-index: 2;
}

.profile-card::after {
    border: 1px solid rgba(165, 242, 107, 0.2);
    content: '';
    inset: 10px;
    pointer-events: none;
    position: absolute;
}

.card-topbar,
.terminal-topbar {
    border-bottom: 1px solid var(--line);
    color: var(--dim);
    font-family: var(--mono);
    font-size: 0.62rem;
    justify-content: space-between;
    min-height: 42px;
    padding: 0 18px;
}

.window-dots {
    display: flex;
    gap: 5px;
}

.window-dots span {
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    height: 7px;
    width: 7px;
}

.window-dots span:first-child {
    background: #f17668;
    border-color: #f17668;
}

.window-dots span:nth-child(2) {
    background: #eab764;
    border-color: #eab764;
}

.window-dots span:last-child {
    background: var(--accent);
    border-color: var(--accent);
}

.topbar-meta {
    color: var(--dim);
    font-size: 0.56rem;
    text-transform: uppercase;
}

.profile-card-body {
    padding: 42px 38px 34px;
    position: relative;
    z-index: 1;
}

.profile-intro {
    gap: 18px;
}

.avatar-wrap {
    position: relative;
}

.avatar {
    border: 2px solid rgba(165, 242, 107, 0.68);
    border-radius: 50%;
    display: block;
    height: 76px;
    object-fit: cover;
    width: 76px;
}

.avatar-status {
    background: var(--accent);
    border: 3px solid var(--panel-solid);
    border-radius: 50%;
    bottom: 1px;
    height: 15px;
    position: absolute;
    right: 0;
    width: 15px;
}

.profile-name {
    font-family: var(--display);
    font-size: 1.35rem;
    font-weight: 600;
}

.profile-handle {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.68rem;
    margin-top: 3px;
}

.profile-copy {
    color: #c1cad6;
    font-size: 0.93rem;
    line-height: 1.75;
    margin: 32px 0 26px;
    max-width: 320px;
}

.code-snippet {
    background: rgba(5, 8, 12, 0.6);
    border-left: 2px solid var(--accent);
    color: #aeb9c7;
    font-family: var(--mono);
    font-size: 0.72rem;
    line-height: 1.95;
    padding: 14px 17px;
}

.code-indent {
    padding-left: 22px;
}

.syntax-keyword {
    color: #d18bff;
}

.syntax-name {
    color: var(--blue);
}

.syntax-string {
    color: var(--accent);
}

.card-footer {
    border-top: 1px solid var(--line);
    color: var(--dim);
    font-family: var(--mono);
    font-size: 0.59rem;
    justify-content: space-between;
    padding: 13px 18px;
    position: relative;
    z-index: 1;
}

.card-footer span:first-child {
    align-items: center;
    display: inline-flex;
    gap: 7px;
}

.footer-signal {
    box-shadow: 0 0 7px var(--accent);
    height: 5px;
    width: 5px;
}

.orbit {
    border: 1px solid rgba(165, 242, 107, 0.22);
    border-radius: 50%;
    height: 360px;
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%) rotate(-20deg);
    width: 460px;
}

.orbit::after {
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 22px 5px rgba(165, 242, 107, 0.45);
    content: '';
    height: 5px;
    left: 12%;
    position: absolute;
    top: 15%;
    width: 5px;
}

.orbit-one {
    opacity: 0.75;
}

.orbit-two {
    height: 420px;
    opacity: 0.35;
    transform: translate(-50%, -50%) rotate(55deg);
    width: 390px;
}

.orbit-two::after {
    background: var(--blue);
    box-shadow: 0 0 18px 4px rgba(127, 203, 255, 0.35);
    left: auto;
    right: 12%;
    top: auto;
    bottom: 18%;
}

.principles {
    border-bottom: 1px solid var(--line);
    border-top: 1px solid var(--line);
    display: grid;
    gap: 26px;
    grid-template-columns: repeat(3, 1fr);
    padding-bottom: 42px;
    padding-top: 42px;
}

.principle {
    border-left: 1px solid var(--line-strong);
    padding-left: 20px;
}

.principle-number,
.panel-label,
.project-index {
    color: var(--accent);
    font-family: var(--mono);
    font-size: 0.64rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.principle h2 {
    font-family: var(--display);
    font-size: 1.05rem;
    font-weight: 600;
    margin: 8px 0 5px;
}

.principle p {
    color: var(--muted);
    font-size: 0.78rem;
}

.section-heading {
    align-items: end;
    display: flex;
    justify-content: space-between;
    margin-bottom: 44px;
}

.section-heading .eyebrow {
    margin-bottom: 17px;
}

.section-heading h2,
.contact-card h2 {
    font-size: clamp(2.2rem, 4.3vw, 3.8rem);
}

.section-description {
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.7;
    max-width: 330px;
}

code {
    background: var(--accent-wash);
    color: var(--accent);
    font-family: var(--mono);
    font-size: 0.8em;
    padding: 3px 6px;
}

.terminal-layout {
    align-items: start;
    display: grid;
    gap: 28px;
    grid-template-columns: minmax(0, 1fr) 210px;
}

.terminal-window {
    background: rgba(7, 10, 15, 0.84);
    border: 1px solid var(--line-strong);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.22);
    min-height: 306px;
}

.terminal-topbar {
    background: rgba(255, 255, 255, 0.025);
}

.terminal-live {
    color: var(--accent);
    gap: 7px;
    text-transform: uppercase;
}

.terminal-live i {
    box-shadow: 0 0 8px var(--accent);
    height: 5px;
    width: 5px;
}

.terminal-body {
    color: var(--accent);
    font-family: var(--mono);
    font-size: 0.76rem;
    min-height: 218px;
    overflow: auto;
    padding: 24px 26px 6px;
}

.terminal-line {
    margin-bottom: 9px;
    white-space: pre-wrap;
}

.terminal-muted {
    color: var(--dim);
}

.prompt-sign {
    color: var(--blue);
    flex-shrink: 0;
}

.input-line {
    align-items: center;
    border-top: 1px solid rgba(173, 186, 205, 0.08);
    display: flex;
    gap: 10px;
    margin: 0 26px;
    padding: 16px 0 20px;
}

#terminal-input {
    background: transparent;
    border: 0;
    color: var(--accent);
    flex: 1;
    font-family: var(--mono);
    font-size: 0.76rem;
    min-width: 0;
    outline: 0;
}

#terminal-input::placeholder {
    color: var(--dim);
}

.command-panel {
    border-left: 1px solid var(--line);
    min-height: 306px;
    padding: 12px 0 12px 25px;
}

.command-list {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    margin-top: 18px;
}

.command-chip {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--muted);
    cursor: pointer;
    font-family: var(--mono);
    font-size: 0.7rem;
    padding: 9px 12px;
    text-align: left;
    transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.command-chip::before {
    color: var(--accent);
    content: '$ ';
}

.command-chip:hover,
.command-chip:focus-visible {
    background: var(--accent-wash);
    border-color: rgba(165, 242, 107, 0.46);
    color: var(--accent);
    outline: 0;
    transform: translateX(3px);
}

.panel-tip {
    color: var(--dim);
    font-size: 0.72rem;
    line-height: 1.6;
    margin-top: 27px;
}

.panel-tip span {
    color: var(--accent);
    display: block;
    font-family: var(--mono);
    margin-bottom: 6px;
}

.text-link,
.project-link {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.7rem;
    gap: 9px;
}

.project-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-card {
    background: linear-gradient(145deg, rgba(18, 23, 33, 0.86), rgba(11, 14, 20, 0.86));
    border: 1px solid var(--line);
    min-height: 350px;
    padding: 25px;
    position: relative;
    transition: border-color 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}

.project-card::before {
    background: linear-gradient(90deg, var(--accent), transparent);
    content: '';
    height: 1px;
    left: 0;
    opacity: 0.72;
    position: absolute;
    right: 25%;
    top: 0;
}

.project-card:hover {
    border-color: rgba(165, 242, 107, 0.43);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
    transform: translateY(-5px);
}

.project-card-header {
    justify-content: space-between;
}

.project-status {
    align-items: center;
    color: var(--accent);
    display: inline-flex;
    font-family: var(--mono);
    font-size: 0.61rem;
    gap: 7px;
    text-transform: uppercase;
}

.project-status-muted {
    color: var(--dim);
}

.project-status-muted::before {
    background: var(--dim);
    border-radius: 50%;
    content: '';
    height: 5px;
    width: 5px;
}

.project-icon {
    align-items: center;
    background: var(--accent-wash);
    color: var(--accent);
    display: flex;
    font-size: 1.35rem;
    height: 46px;
    justify-content: center;
    margin: 50px 0 21px;
    width: 46px;
}

.project-icon-alt {
    background: rgba(127, 203, 255, 0.09);
    color: var(--blue);
}

.project-card h3 {
    font-family: var(--display);
    font-size: 1.45rem;
    font-weight: 600;
    letter-spacing: -0.035em;
}

.project-card p {
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.75;
    margin-top: 12px;
    max-width: 450px;
}

.project-card-footer {
    bottom: 25px;
    justify-content: space-between;
    left: 25px;
    position: absolute;
    right: 25px;
}

.tags {
    flex-wrap: wrap;
    gap: 6px;
}

.tags span {
    border: 1px solid var(--line);
    color: var(--dim);
    font-family: var(--mono);
    font-size: 0.59rem;
    padding: 4px 7px;
}

.project-link {
    color: var(--accent);
    font-size: 0.64rem;
    white-space: nowrap;
}

.contact-card {
    align-items: center;
    background: var(--accent-wash);
    border: 1px solid rgba(165, 242, 107, 0.24);
    display: flex;
    justify-content: space-between;
    padding-bottom: 52px;
    padding-top: 52px;
}

.contact-card .eyebrow {
    margin-bottom: 16px;
}

.contact-card h2 {
    font-size: clamp(2rem, 4vw, 3.25rem);
}

.contact-card p:last-child {
    color: var(--muted);
    font-size: 0.84rem;
    margin-top: 13px;
    max-width: 510px;
}

.site-footer {
    border-top: 1px solid var(--line);
    color: var(--dim);
    font-family: var(--mono);
    font-size: 0.62rem;
    justify-content: space-between;
    min-height: 82px;
}

.footer-center {
    color: var(--dim);
}

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 650ms ease, transform 650ms ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-copy.reveal {
    transition-delay: 80ms;
}

.hero-visual.reveal {
    transition-delay: 180ms;
}

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

    .reveal {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 820px) {
    .hero {
        gap: 64px;
        grid-template-columns: 1fr;
        padding-bottom: 86px;
        padding-top: 82px;
    }

    .hero-copy {
        max-width: 680px;
    }

    .hero-visual {
        min-height: 430px;
    }

    .principles {
        grid-template-columns: 1fr;
    }

    .terminal-layout {
        grid-template-columns: 1fr;
    }

    .command-panel {
        border-left: 0;
        border-top: 1px solid var(--line);
        min-height: 0;
        padding: 25px 0 0;
    }

    .command-list {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .command-chip {
        flex: 1 1 100px;
    }

    .panel-tip {
        display: none;
    }
}

@media (max-width: 600px) {
    .page-shell {
        width: min(100% - 32px, var(--max-width));
    }

    .site-header {
        min-height: 66px;
    }

    .site-nav {
        gap: 13px;
        font-size: 0.62rem;
    }

    .site-nav a:not(.nav-github) {
        display: none;
    }

    .nav-github {
        padding: 7px 9px;
    }

    .section-pad {
        padding-bottom: 78px;
        padding-top: 78px;
    }

    .hero {
        min-height: 0;
        padding-bottom: 78px;
        padding-top: 68px;
    }

    .hero h1 {
        font-size: clamp(3rem, 14vw, 4.4rem);
    }

    .hero-lede {
        font-size: 0.91rem;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
        max-width: 220px;
    }

    .hero-visual {
        min-height: 368px;
    }

    .profile-card {
        top: 4px;
        transform: translateX(-50%) rotate(1deg);
    }

    .profile-card-body {
        padding: 30px 24px 26px;
    }

    .profile-copy {
        margin: 24px 0 20px;
    }

    .orbit {
        height: 300px;
        width: 335px;
    }

    .section-heading {
        align-items: start;
        flex-direction: column;
        gap: 22px;
        margin-bottom: 32px;
    }

    .section-heading h2,
    .contact-card h2 {
        font-size: 2.35rem;
    }

    .terminal-body {
        padding-left: 18px;
        padding-right: 18px;
    }

    .input-line {
        margin-left: 18px;
        margin-right: 18px;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .project-card {
        min-height: 370px;
    }

    .project-card-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .contact-card {
        align-items: flex-start;
        flex-direction: column;
        gap: 28px;
    }

    .site-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 9px;
        justify-content: center;
        padding: 23px 0;
    }

    .footer-center {
        order: 3;
    }
}
