:root {
    color-scheme: dark;
    --bg: #05070d;
    --surface: #0a0f1a;
    --panel: rgba(12, 19, 32, 0.82);
    --line: rgba(129, 243, 255, 0.2);
    --text: #edf7ff;
    --muted: #9db1c5;
    --cyan: #62efff;
    --lime: #9dff7a;
    --violet: #b48cff;
    --amber: #ffd166;
    --pink: #ff6bd6;
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 16% 12%, rgba(98, 239, 255, 0.2), transparent 28rem),
        radial-gradient(circle at 85% 8%, rgba(180, 140, 255, 0.18), transparent 30rem),
        linear-gradient(135deg, #05070d 0%, #0a1020 48%, #05070d 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body.login-page {
    display: grid;
    place-items: center;
    padding: 24px;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(rgba(98, 239, 255, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(98, 239, 255, 0.055) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: linear-gradient(to bottom, black, transparent 82%);
}

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

:focus-visible {
    outline: 3px solid rgba(98, 239, 255, 0.46);
    outline-offset: 3px;
}

.scanline {
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 20;
    background: linear-gradient(rgba(255, 255, 255, 0.025) 50%, transparent 50%);
    background-size: 100% 4px;
    opacity: 0.26;
}

.site-header,
main,
.site-footer {
    width: min(1160px, calc(100% - 32px));
    margin: 0 auto;
}

.login-shell {
    display: grid;
    place-items: center;
    width: min(100%, 460px);
    min-height: calc(100vh - 48px);
}

.login-card {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)),
        var(--panel);
    box-shadow: var(--shadow);
    padding: 28px;
}

.login-card h1 {
    margin: 0;
    font-size: 36px;
    line-height: 1;
}

.login-card p:not(.eyebrow) {
    margin: 12px 0 22px;
    color: var(--muted);
}

.login-card label {
    display: block;
    margin: 14px 0 7px;
    color: var(--text);
    font-weight: 900;
}

.login-card input {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(5, 7, 13, 0.72);
    color: var(--text);
    font: inherit;
    padding: 10px 12px;
}

.login-card input:focus {
    outline: 3px solid rgba(98, 239, 255, 0.26);
    border-color: rgba(98, 239, 255, 0.62);
}

.login-card .button-primary {
    width: 100%;
    border: 0;
    margin-top: 18px;
    cursor: pointer;
    font: inherit;
}

.login-error {
    border: 1px solid rgba(255, 107, 214, 0.38);
    border-radius: 8px;
    background: rgba(255, 107, 214, 0.1);
    color: #ffd6f3;
    padding: 10px 12px;
    font-weight: 800;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 0;
    backdrop-filter: blur(18px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(98, 239, 255, 0.46);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(98, 239, 255, 0.22), rgba(255, 107, 214, 0.14));
    box-shadow: 0 0 28px rgba(98, 239, 255, 0.18), inset 0 0 18px rgba(255, 255, 255, 0.04);
    color: var(--cyan);
    font: 900 13px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    color: var(--muted);
    font-size: 13px;
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.main-nav a {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(10, 15, 26, 0.72);
    color: var(--muted);
    padding: 9px 12px;
    font-size: 14px;
    font-weight: 800;
    transition: border-color 160ms ease, color 160ms ease, transform 160ms ease, background 160ms ease;
}

.main-nav a:hover {
    border-color: rgba(98, 239, 255, 0.52);
    background: rgba(98, 239, 255, 0.08);
    color: var(--text);
    transform: translateY(-1px);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
    gap: 44px;
    align-items: center;
    min-height: 680px;
    padding: 54px 0 74px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--cyan);
    font: 900 12px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
    text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.profile-section h2 {
    margin: 0;
    letter-spacing: 0;
}

.hero h1 {
    max-width: 820px;
    font-size: clamp(42px, 8vw, 88px);
    line-height: 0.96;
}

.hero-copy p:not(.eyebrow) {
    max-width: 680px;
    color: #c2d2e3;
    font-size: 18px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.button-primary,
.button-secondary,
.project-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 10px;
    padding: 11px 15px;
    font-weight: 900;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button-primary {
    background: linear-gradient(135deg, var(--cyan), #7cffbc);
    color: #031017;
    box-shadow: 0 18px 42px rgba(98, 239, 255, 0.2);
}

.button-secondary {
    border: 1px solid var(--line);
    background: rgba(10, 15, 26, 0.76);
    color: var(--text);
}

.button-primary:hover,
.button-secondary:hover,
.project-link:hover {
    transform: translateY(-2px);
}

.orbit-panel {
    position: relative;
    min-height: 420px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        radial-gradient(circle at center, rgba(98, 239, 255, 0.18), transparent 6rem),
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01)),
        var(--panel);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.orbit-panel::before,
.orbit-panel::after {
    content: "";
    position: absolute;
    inset: 18%;
    border: 1px solid rgba(98, 239, 255, 0.22);
    border-radius: 50%;
}

.orbit-panel::after {
    inset: 30%;
    border-color: rgba(255, 107, 214, 0.24);
}

.orbit-core,
.orbit-node {
    position: absolute;
    display: grid;
    place-items: center;
    border-radius: 999px;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-weight: 900;
}

.orbit-core {
    inset: calc(50% - 46px);
    border: 1px solid rgba(98, 239, 255, 0.5);
    background: #081421;
    color: var(--cyan);
    box-shadow: 0 0 38px rgba(98, 239, 255, 0.28);
}

.orbit-node {
    width: 62px;
    height: 62px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(8, 20, 33, 0.9);
    color: var(--text);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

.orbit-node-1 { top: 16%; left: 16%; color: var(--lime); }
.orbit-node-2 { top: 18%; right: 16%; color: var(--violet); }
.orbit-node-3 { bottom: 17%; left: 18%; color: var(--cyan); }
.orbit-node-4 { right: 18%; bottom: 18%; color: var(--amber); }

.signal-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 58px;
}

.signal-strip span {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    padding: 8px 11px;
    font-size: 13px;
    font-weight: 800;
}

.section-heading {
    margin-bottom: 22px;
}

.section-heading h2,
.profile-section h2 {
    font-size: clamp(30px, 5vw, 52px);
}

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

.project-card {
    display: grid;
    grid-template-columns: minmax(150px, 0.7fr) minmax(0, 1fr);
    min-height: 330px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(10, 15, 26, 0.78);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.project-visual {
    position: relative;
    min-height: 100%;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent),
        #09111f;
    overflow: hidden;
}

.project-visual span {
    position: absolute;
    left: 18px;
    top: 18px;
    z-index: 1;
    color: rgba(255, 255, 255, 0.72);
    font: 900 12px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
    text-transform: uppercase;
}

.project-visual div {
    position: absolute;
    inset: 52px 24px 24px;
    border: 1px solid currentColor;
    border-radius: 8px;
    background:
        linear-gradient(currentColor 0 0) 20% 24% / 42% 2px no-repeat,
        linear-gradient(currentColor 0 0) 20% 40% / 62% 2px no-repeat,
        linear-gradient(currentColor 0 0) 20% 56% / 36% 2px no-repeat,
        radial-gradient(circle at 70% 34%, currentColor 0 10px, transparent 11px);
    opacity: 0.62;
    transform: skewY(-7deg);
}

.project-card.lime .project-visual { color: var(--lime); }
.project-card.violet .project-visual { color: var(--violet); }
.project-card.cyan .project-visual { color: var(--cyan); }
.project-card.amber .project-visual { color: var(--amber); }

.project-body {
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.project-tag {
    color: var(--cyan);
    font: 900 12px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
    text-transform: uppercase;
}

.project-card h3 {
    margin: 10px 0 8px;
    font-size: 30px;
}

.project-card p {
    margin: 0;
    color: #bdccdc;
}

.project-card ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 22px;
    padding: 0;
    list-style: none;
}

.project-card li {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    color: var(--muted);
    padding: 6px 8px;
    font-size: 12px;
    font-weight: 800;
}

.project-link {
    align-self: flex-start;
    gap: 8px;
    margin-top: auto;
    border: 1px solid rgba(98, 239, 255, 0.38);
    color: var(--text);
}

.profile-section {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    margin: 76px 0 56px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 34px 0;
}

.profile-section {
    scroll-margin-top: 110px;
}

.profile-section p:last-child {
    margin: 0;
    color: #c2d2e3;
    font-size: 18px;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 0 34px;
    color: var(--muted);
}

.site-footer a {
    color: var(--cyan);
    font-weight: 900;
}

@media (max-width: 900px) {
    .site-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .main-nav {
        justify-content: flex-start;
        width: 100%;
    }

    .hero,
    .profile-section {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: 0;
        padding-top: 34px;
    }

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

@media (max-width: 620px) {
    .site-header,
    main,
    .site-footer {
        width: min(100% - 22px, 1160px);
    }

    .main-nav {
        flex-wrap: nowrap;
        margin: 0 -11px;
        padding: 0 11px 8px;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .main-nav a {
        white-space: nowrap;
    }

    .brand small {
        display: none;
    }

    .hero h1 {
        font-size: 42px;
    }

    .hero-actions,
    .button-primary,
    .button-secondary {
        width: 100%;
    }

    .orbit-panel {
        min-height: 330px;
    }

    .orbit-node {
        width: 52px;
        height: 52px;
    }

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

    .project-visual {
        min-height: 170px;
    }

    .site-footer {
        flex-direction: column;
    }
}
