:root {
    --bg-0: #010106;
    --bg-1: #030715;
    --bg-2: #070d1f;
    --text-primary: #f3f7ff;
    --text-muted: #9fb0cf;
    --neon-cyan: #48f1ff;
    --neon-blue: #7f9eff;
    --neon-pink: #ff77b4;
    --glass-fill: rgba(7, 13, 31, 0.24);
    --glass-border: rgba(100, 185, 255, 0.28);
}

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

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

body {
    font-family: 'Sora', sans-serif;
    color: var(--text-primary);
    background: radial-gradient(circle at 8% 8%, rgba(46, 152, 255, 0.2), transparent 26%),
        radial-gradient(circle at 82% 88%, rgba(255, 118, 180, 0.14), transparent 31%),
        linear-gradient(170deg, var(--bg-0) 0%, var(--bg-1) 42%, #02030b 100%);
    overflow-x: hidden;
    cursor: crosshair;
}

#space-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

.scanlines {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.14;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0) 52%,
            rgba(0, 0, 0, 0.12) 52%,
            rgba(0, 0, 0, 0.12) 100%);
    background-size: 100% 4px;
}

.site-shell {
    position: relative;
    z-index: 2;
    max-width: 1420px;
    margin: 0 auto;
    padding: clamp(1.3rem, 2.4vw, 2.6rem);
    padding-bottom: 3rem;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.95fr);
    align-items: start;
    gap: 1.4rem 2.8rem;
    margin-bottom: 2.5rem;
}

.hero-left {
    min-width: 0;
}

.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.3rem, 6vw, 5.7rem);
    font-weight: 700;
    line-height: 0.96;
    letter-spacing: 0.04em;
    margin: 0;
    max-width: 100%;
    text-wrap: balance;
    word-break: break-word;
    overflow-wrap: anywhere;
    background: linear-gradient(90deg, #5cefff 0%, #9cb4ff 48%, #ff7db8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 24px rgba(89, 215, 255, 0.3);
}

.typewriter-wrap {
    margin-top: 1.15rem;
    height: 1.75em;
    max-width: min(100%, 56ch);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    overflow: hidden;
    white-space: nowrap;
    color: #adbbd8;
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.9rem, 1.25vw, 1.25rem);
    letter-spacing: 0.03em;
}

#typewriter-text {
    display: inline-block;
    max-width: calc(100% - 1.2rem);
    overflow: hidden;
    text-overflow: clip;
    white-space: nowrap;
}

.cursor {
    display: inline-block;
    width: 0.72rem;
    height: 1.3em;
    vertical-align: -0.2em;
    background: var(--neon-cyan);
    box-shadow: 0 0 18px rgba(72, 241, 255, 0.9);
    animation: blink 1.05s steps(1) infinite;
    flex: 0 0 auto;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.hero-right {
    justify-self: end;
    text-align: right;
    margin-top: 0.45rem;
}

.profile-name {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(1.8rem, 2.6vw, 3.1rem);
    color: var(--neon-cyan);
    text-shadow: 0 0 16px rgba(72, 241, 255, 0.35);
}

.profile-role {
    margin-top: 0.25rem;
    color: #bec9e4;
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.86rem, 1.05vw, 1.44rem);
}

.profile-link {
    display: inline-block;
    margin-top: 1.2rem;
    border-radius: 999px;
    border: 1px solid rgba(116, 229, 255, 0.6);
    padding: 0.86rem 1.52rem;
    text-decoration: none;
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.77rem, 0.86vw, 1rem);
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #dff7ff;
    background: linear-gradient(120deg, rgba(72, 241, 255, 0.18), rgba(255, 119, 180, 0.16));
    box-shadow: inset 0 0 14px rgba(72, 241, 255, 0.2), 0 0 20px rgba(90, 169, 255, 0.2);
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.profile-link:hover {
    transform: translateY(-2px);
    background: linear-gradient(120deg, rgba(72, 241, 255, 0.34), rgba(255, 119, 180, 0.24));
    box-shadow: 0 0 24px rgba(72, 241, 255, 0.36), 0 0 30px rgba(255, 119, 180, 0.18);
}

.pipeline {
    margin-top: 0.8rem;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.6rem, 3.5vw, 3.9rem);
    line-height: 1.1;
    color: var(--neon-cyan);
    margin-bottom: 1.4rem;
    text-shadow: 0 0 16px rgba(72, 241, 255, 0.22);
    padding-bottom: 0.45rem;
    border-bottom: 1px solid rgba(100, 185, 255, 0.38);
    display: inline-block;
}

.node-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.2rem;
}

.node-card {
    position: relative;
    background: var(--glass-fill);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1rem;
    min-height: 14.8rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 0 24px rgba(17, 35, 92, 0.2), inset 0 0 10px rgba(82, 194, 255, 0.05);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.node-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 20px;
    border: 1px solid transparent;
    background: linear-gradient(140deg, rgba(72, 241, 255, 0.45), rgba(127, 158, 255, 0.26), rgba(255, 119, 180, 0.35)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.node-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
}

.node-status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(85, 255, 198, 0.6);
    background: rgba(60, 210, 153, 0.16);
    box-shadow: inset 0 0 8px rgba(88, 255, 194, 0.2);
    color: #d6fff1;
    font-size: 0.76rem;
    letter-spacing: 0.15em;
    font-family: 'IBM Plex Mono', monospace;
    padding: 0.35rem 0.64rem;
}

.node-url {
    font-family: 'IBM Plex Mono', monospace;
    color: #9cb0d4;
    font-size: 0.76rem;
    letter-spacing: 0.02em;
    text-align: right;
    word-break: break-word;
}

.node-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.12rem, 1.5vw, 1.45rem);
    line-height: 1.08;
    margin-bottom: 0.52rem;
    color: #f5f8ff;
    max-width: 16ch;
}

.node-card p {
    color: var(--text-muted);
    line-height: 1.48;
    font-size: clamp(0.79rem, 0.92vw, 0.94rem);
    margin-bottom: 0.66rem;
}

.node-note {
    margin: 0 0 0.72rem;
    padding: 0.62rem 0.72rem;
    border-radius: 12px;
    border: 1px solid rgba(104, 194, 255, 0.3);
    background: rgba(2, 10, 30, 0.22);
    color: #95ebff;
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.62rem, 0.72vw, 0.76rem);
    line-height: 1.38;
}

.node-note-typing {
    height: auto;
    min-height: 0;
    font-size: clamp(0.62rem, 0.72vw, 0.76rem);
    color: #84dcff;
    display: block;
}

#api-note-typing {
    white-space: normal;
    line-height: 1.42;
}

.mini-cursor {
    display: inline-block;
    width: 0.5rem;
    height: 1.15em;
    background: rgba(94, 233, 255, 0.92);
    box-shadow: 0 0 12px rgba(94, 233, 255, 0.8);
    animation: blink 1s steps(1) infinite;
    vertical-align: -0.18em;
    margin-left: 0.16rem;
}

.node-link {
    margin-top: auto;
    display: inline-flex;
    align-self: center;
    justify-content: center;
    text-decoration: none;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    font-size: 0.74rem;
    color: #dff8ff;
    border-radius: 11px;
    border: 1px solid rgba(89, 211, 255, 0.74);
    padding: 0.56rem 1.02rem;
    background: rgba(4, 14, 33, 0.04);
    box-shadow: inset 0 0 12px rgba(72, 241, 255, 0.16), 0 0 14px rgba(72, 241, 255, 0.22);
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.node-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 18px rgba(72, 241, 255, 0.5), 0 0 20px rgba(255, 119, 180, 0.2);
    background: rgba(4, 14, 33, 0.08);
}

@media (max-width: 1180px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .hero-right {
        justify-self: start;
        text-align: left;
        margin-top: 0;
        width: 100%;
    }
}

@media (max-width: 760px) {
    body {
        cursor: default;
    }

    .site-shell {
        padding: 0.95rem 0.78rem 2.2rem;
    }

    .hero {
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }

    .hero-title {
        font-size: clamp(1.95rem, 11vw, 3.15rem);
        line-height: 1.01;
        letter-spacing: 0.028em;
    }

    .typewriter-wrap {
        margin-top: 0.78rem;
        height: 1.65em;
        max-width: 100%;
        font-size: clamp(0.78rem, 3.2vw, 1rem);
    }

    .profile-name {
        font-size: clamp(1.55rem, 7.2vw, 2.2rem);
    }

    .profile-role {
        font-size: clamp(0.8rem, 3.6vw, 1rem);
        line-height: 1.34;
    }

    .profile-link {
        width: 100%;
        text-align: center;
        margin-top: 0.82rem;
        padding: 0.76rem 0.85rem;
        letter-spacing: 0.055em;
    }

    .section-title {
        font-size: clamp(1.32rem, 7.4vw, 2.1rem);
        margin-bottom: 1rem;
        padding-bottom: 0.36rem;
    }

    .node-grid {
        grid-template-columns: 1fr;
        gap: 0.92rem;
    }

    .node-card {
        min-height: auto;
        padding: 0.94rem;
        border-radius: 16px;
    }

    .node-top {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.45rem;
    }

    .node-card h3 {
        max-width: none;
        font-size: clamp(1.34rem, 7vw, 1.82rem);
        line-height: 1.08;
        margin-bottom: 0.75rem;
    }

    .node-card p {
        font-size: 0.97rem;
        line-height: 1.52;
    }

    .node-note {
        font-size: 0.67rem;
        line-height: 1.42;
        padding: 0.66rem 0.68rem;
    }

    .node-note-typing {
        font-size: 0.67rem;
    }

    .node-url {
        font-size: 0.68rem;
        text-align: left;
        width: 100%;
    }

    .node-link {
        width: 100%;
        text-align: center;
    }

    .scanlines {
        opacity: 0.08;
    }
}

@media (max-width: 460px) {
    .site-shell {
        padding: 0.78rem 0.62rem 1.9rem;
    }

    .hero-title {
        font-size: clamp(1.72rem, 10.4vw, 2.42rem);
        letter-spacing: 0.024em;
    }

    .cursor {
        width: 0.58rem;
    }

    .node-status {
        font-size: 0.69rem;
        letter-spacing: 0.11em;
    }

    .node-link {
        font-size: 0.76rem;
    }
}
