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

:root {
    --bg: #070809;
    --surface: rgba(19, 21, 24, 0.82);
    --surface-strong: #101214;
    --text: #f4f7fb;
    --muted: #a8b2c1;
    --border: rgba(255, 255, 255, 0.12);
    --nitrogen: #ff566a;
    --lithium: #2acfff;
    --magnesium: #56ff9a;
    --helium: #ff9ad7;
    --sodium: #4fce3f;
    --neon: #9e88ff;
    --oxygen: #ff9560;
    --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    --radius-lg: 24px;
    --radius-md: 16px;
    --grid-tilt-x: 0;
    --grid-tilt-y: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: radial-gradient(900px 500px at 20% -15%, rgba(255, 255, 255, 0.05), transparent 60%),
        radial-gradient(900px 540px at 90% 8%, rgba(255, 255, 255, 0.03), transparent 62%),
        var(--bg);
    color: var(--text);
    font-family: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
    line-height: 1.5;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

#bgTint {
    position: fixed;
    inset: 0;
    z-index: -3;
    pointer-events: none;
    transition: background 0.75s ease;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.07), rgba(7, 8, 9, 1) 70%);
}

.bg-grid {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.65), transparent 95%);
    transform-origin: center;
    transform: perspective(900px) rotateX(calc(var(--grid-tilt-y) * 1deg)) rotateY(calc(var(--grid-tilt-x) * 1deg));
    transition: transform 0.22s ease-out, background-position 0.22s ease-out;
}

.orb {
    display: none;
}

.orb-a {
    background: #ff4f74;
    top: 10vh;
    left: 4vw;
}

.orb-b {
    background: #35dbff;
    top: 58vh;
    right: 9vw;
    animation-delay: -5s;
}

.orb-c {
    background: #8d73ff;
    top: 36vh;
    left: 50vw;
    animation-delay: -9s;
}

img {
    display: block;
    max-width: 100%;
}

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

.page-wrap {
    width: min(1200px, calc(100% - 2.5rem));
    margin: 0 auto;
}

.shell {
    padding-top: 7.25rem;
    padding-bottom: 4rem;
}

.glass-nav {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: min(1120px, calc(100% - 1.5rem));
    z-index: 50;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(10, 12, 15, 0.8);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
    animation: nav-drop 0.85s cubic-bezier(0.19, 1, 0.22, 1);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.55rem 0.75rem;
    border-radius: 999px;
}

.brand img {
    width: 1.4rem;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.nav-links a {
    display: inline-block;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 600;
    transition: color 0.25s ease, transform 0.25s ease;
    position: relative;
    overflow: hidden;
    z-index: 0;
}

.nav-links a::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: 999px;
    background: var(--nav-hover-gradient, linear-gradient(120deg, #ffffff, #d7d7d7));
    background-size: 220% 220%;
    opacity: 0;
    transform: translateY(6px) scale(0.9);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.active {
    color: #050505;
    transform: translateY(-1px);
}

.nav-links a:hover::before,
.nav-links a:focus-visible::before,
.nav-links a.active::before {
    opacity: 1;
    transform: translateY(0) scale(1);
    animation: gradient-flow 5.4s ease infinite;
}

.nav-home {
    --nav-hover-gradient: linear-gradient(120deg, #ffffff, #dddddd);
}

.nav-projects {
    --nav-hover-gradient: linear-gradient(120deg, #ff5f75, #ffc554, #62f7ff);
}

.nav-inbox {
    --nav-hover-gradient: linear-gradient(120deg, #ff8f44, #ffe17b);
}

.nav-about {
    --nav-hover-gradient: linear-gradient(120deg, #5af3b5, #7ed8ff);
}

.nav-contact {
    --nav-hover-gradient: linear-gradient(120deg, #c58dff, #ff8ae3);
}

.nav-team {
    --nav-hover-gradient: linear-gradient(120deg, #ffffff, #c8d0da, #ffffff);
}

.nav-toggle {
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.09);
    color: var(--text);
    width: 2.35rem;
    height: 2.35rem;
    display: none;
    place-items: center;
    cursor: pointer;
}

.hero {
    display: grid;
    gap: 1.75rem;
    justify-items: center;
    text-align: center;
    padding: 2.5rem 0 1rem;
    position: relative;
}

.hero-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 5rem;
    height: 5rem;
    border-radius: 1.4rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03));
    box-shadow: var(--shadow);
    animation: float-mark 4s ease-in-out infinite;
}

.hero-mark i {
    font-size: 2.35rem;
}

body[data-page="home"] .hero-mark i {
    font-size: 1.55rem;
}

body:not([data-page="home"]) .hero-mark i {
    font-size: 2.7rem;
}

.hero-mark img {
    width: 72%;
    height: 72%;
    object-fit: contain;
}

body:not([data-page="home"]) .hero-mark img {
    width: 72%;
    height: 72%;
}

.hero h1 {
    font-size: clamp(2.4rem, 8vw, 7rem);
    letter-spacing: -0.04em;
    line-height: 1;
    animation: fade-up 0.8s ease-out;
}

.hero p {
    max-width: 760px;
    color: var(--muted);
    font-size: clamp(1.03rem, 2.2vw, 1.4rem);
    animation: fade-up 1s ease-out;
}

.button-row {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border-radius: 999px;
    border: 1px solid transparent;
    padding: 0.72rem 1.1rem;
    font-weight: 700;
    transition: transform 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.25), transparent 80%);
    transform: translateX(-130%);
    transition: transform 0.65s ease;
}

.btn:hover,
.btn:focus-visible {
    transform: translateY(-2px);
}

.btn:hover::after,
.btn:focus-visible::after {
    transform: translateX(130%);
}

.btn-primary {
    color: #070809;
    background: #ffffff;
}

.btn-ghost {
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.04);
}

.section {
    margin-top: 2.5rem;
}

.section[data-color] {
    scroll-margin-top: 8rem;
}

.section-head {
    margin-bottom: 1rem;
}

.section-head h2 {
    font-size: clamp(1.5rem, 3.2vw, 2.4rem);
    letter-spacing: -0.03em;
}

.section-head p {
    color: var(--muted);
    max-width: 720px;
}

.section-label {
    margin-top: 1.2rem;
    color: #c9d4e8;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.section-title {
    margin-top: 0.2rem;
    margin-bottom: 0.9rem;
    font-size: clamp(1.25rem, 2.3vw, 1.85rem);
    letter-spacing: -0.02em;
}

.grid {
    display: grid;
    gap: 1rem;
}

.cards-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cards-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    backdrop-filter: blur(8px);
    padding: 1.1rem;
    min-height: 100%;
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.35);
}

.card h3 {
    font-size: 1.35rem;
    letter-spacing: -0.02em;
}

.card p {
    color: var(--muted);
    margin-top: 0.55rem;
}

.pill {
    display: inline-block;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 0.78rem;
    font-weight: 700;
    color: #d6dced;
    padding: 0.2rem 0.55rem;
    margin-bottom: 0.55rem;
}

.project-list {
    display: grid;
    gap: 1rem;
}

.project-item {
    display: grid;
    gap: 0.7rem;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}

.project-item:hover {
    transform: translateY(-4px) scale(1.01);
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
}

.project-item-featured {
    border-color: rgba(42, 207, 255, 0.32);
    background: linear-gradient(145deg, rgba(12, 34, 44, 0.75), rgba(255, 255, 255, 0.03));
}

.project-item-featured:hover {
    border-color: rgba(42, 207, 255, 0.52);
}

.project-item h3 {
    font-size: 1.18rem;
    letter-spacing: -0.01em;
}

.project-main {
    position: relative;
    z-index: 2;
}

.project-end {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: #ffffff;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: width 0.35s cubic-bezier(0.2, 1, 0.22, 1);
    z-index: 3;
    transform: skewX(-8deg) translateX(14px);
}

.project-github {
    opacity: 0;
    transform: translateX(18px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    background: #f4f4f4;
    border-radius: 12px;
    border: 0;
    color: #171717;
    padding: 0.55rem 0.72rem;
    font-size: 0.82rem;
    font-weight: 700;
    display: inline-flex;
    gap: 0.42rem;
    align-items: center;
    white-space: nowrap;
    transform: skewX(8deg);
}

.project-item:hover .project-end {
    width: 220px;
}

.project-item:hover .project-github {
    opacity: 1;
    transform: translateX(0);
}

.project-item:hover .status {
    opacity: 0;
    transform: translateX(-24px);
}

.team-member-card {
    display: grid;
    grid-template-columns: minmax(260px, 0.92fr) minmax(0, 1.08fr);
    gap: 1.1rem;
    align-items: center;
}

.team-cutout {
    position: relative;
    min-height: 280px;
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--border);
}

.team-cutout::before {
    content: "";
    position: absolute;
    inset: 10% 12% 0 12%;
    border-radius: 40% 40% 18% 18% / 38% 38% 20% 20%;
    background: radial-gradient(circle at 50% 28%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.72) 20%, rgba(255, 255, 255, 0.16) 44%, rgba(255, 255, 255, 0.03) 72%, transparent 75%);
    box-shadow: inset 0 -26px 40px rgba(0, 0, 0, 0.3);
}

.team-cutout img {
    position: absolute;
    inset: 10% 12% 0 12%;
    width: 76%;
    height: 82%;
    object-fit: contain;
    filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.5));
    animation: float-mark 5s ease-in-out infinite;
}

.team-member-copy {
    display: grid;
    gap: 0.8rem;
}

.team-member-copy h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    letter-spacing: -0.04em;
}

.team-member-copy p {
    color: var(--muted);
    max-width: 46rem;
}

.team-join-card {
    display: grid;
    gap: 0.8rem;
    justify-items: start;
}

.team-join-card h2 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    letter-spacing: -0.03em;
}

.join-card {
    display: grid;
    gap: 0.7rem;
    padding: 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(255, 255, 255, 0.14);
}

.join-card h3 {
    font-size: 1.4rem;
}

.join-card p {
    color: var(--muted);
}

.join-card .btn {
    width: fit-content;
}

.project-meta {
    color: var(--muted);
    font-size: 0.95rem;
}

.mono {
    font-family: "JetBrains Mono", "Consolas", monospace;
}

.code-chip {
    display: inline-block;
    margin-top: 0.45rem;
    padding: 0.32rem 0.48rem;
    border-radius: 9px;
    background: #0f1317;
    border: 1px solid var(--border);
    font-size: 0.9rem;
}

.code-chip.copyable {
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.code-chip.copyable:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.3);
}

.install-dropdown {
    margin-top: 0.55rem;
    width: min(460px, 100%);
    border: 1px solid rgba(42, 207, 255, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
}

.install-dropdown summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    cursor: pointer;
    color: #dbe9f8;
    font-weight: 700;
}

.install-dropdown summary::-webkit-details-marker {
    display: none;
}

.install-dropdown i {
    font-size: 0.78rem;
    transition: transform 0.2s ease;
}

.install-dropdown[open] i {
    transform: rotate(180deg);
}

.install-options {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.62rem 0.75rem 0.75rem;
    display: grid;
    gap: 0.25rem;
}

.install-note {
    color: var(--muted);
    font-size: 0.85rem;
}

.install-options .code-chip {
    width: fit-content;
}

.copy-popup {
    position: fixed;
    padding: 6px 10px;
    border-radius: 8px;
    background: #f2f2f2;
    color: #171717;
    font-size: 12px;
    font-weight: 700;
    pointer-events: none;
    z-index: 9999;
    animation: fade-copy 0.95s forwards;
}

.status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.24rem 0.58rem;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.status.live {
    color: #d2ffde;
    background: rgba(73, 219, 122, 0.16);
    border-color: rgba(73, 219, 122, 0.4);
}

.status.wip {
    color: #ffe8c4;
    background: rgba(255, 179, 82, 0.17);
    border-color: rgba(255, 179, 82, 0.4);
}

.footer {
    margin-top: 4rem;
    padding-bottom: 2.5rem;
    text-align: center;
    color: #8790a1;
    font-size: 0.92rem;
}

.article {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.1rem;
    background: rgba(255, 255, 255, 0.03);
}

.article h3 {
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}

.article time {
    color: #89b8ff;
    font-size: 0.84rem;
    font-weight: 700;
}

.article p {
    margin-top: 0.7rem;
    color: var(--muted);
}

.form {
    display: grid;
    gap: 0.85rem;
}

label {
    display: grid;
    gap: 0.35rem;
    font-weight: 700;
    font-size: 0.95rem;
}

input,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.25);
    color: var(--text);
    padding: 0.7rem 0.8rem;
    font-family: inherit;
}

textarea {
    min-height: 150px;
    resize: vertical;
}

.notice {
    color: var(--muted);
    font-size: 0.9rem;
}

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

.reveal.in {
    opacity: 1;
    transform: translateY(0);
}

.pub {
    background-size: 280% 280%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradient-flow 6.5s ease infinite;
    font-weight: 800;
}

.pub-nitrogen {
    background-image: linear-gradient(90deg, #ff4d4d, #ffb84d, #ff4d9d);
}

.pub-lithium {
    background-image: linear-gradient(90deg, #00e1ff, #008cff, #4de1ff);
}

.pub-magnesium {
    background-image: linear-gradient(90deg, #4dd4ff, #4dff88, #7a4dff);
}

.pub-helium {
    background-image: linear-gradient(90deg, #ffd54d, #ff6fd8, #4de1ff);
}

.pub-sodium {
    background-image: linear-gradient(90deg, #00ff15, #0d460b, #9cff7e);
}

.pub-neon {
    background-image: linear-gradient(90deg, #864da0, #b5b5eb);
}

.pub-oxygen {
    background-image: linear-gradient(90deg, #886926, #008cff, #f83232);
}

.ticker {
    margin-top: 1.5rem;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
}

.ticker-track {
    display: flex;
    width: max-content;
    gap: 1.4rem;
    padding: 0.55rem 0.9rem;
    animation: ticker-run 23s linear infinite;
}

.ticker-item {
    color: var(--muted);
    font-size: 0.95rem;
    white-space: nowrap;
}

.pulse-dot {
    display: inline-block;
    width: 0.45rem;
    aspect-ratio: 1;
    border-radius: 50%;
    margin-right: 0.35rem;
    background: #69ff9b;
    animation: pulse 1.6s ease infinite;
}

@keyframes gradient-flow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float-mark {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes nav-drop {
    from {
        opacity: 0;
        transform: translate(-50%, -12px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes drift {
    0%,
    100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(18px, -20px);
    }
}

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.75);
    }
}

@keyframes fade-copy {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-10px);
    }
}

@keyframes ticker-run {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

@media (max-width: 980px) {
    .cards-3 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 760px) {
    .shell {
        padding-top: 6.5rem;
    }

    .nav-toggle {
        display: grid;
    }

    .nav-links {
        position: absolute;
        top: calc(100% + 0.45rem);
        right: 0;
        left: 0;
        border: 1px solid var(--border);
        border-radius: 18px;
        background: rgba(10, 12, 15, 0.95);
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 0.35rem;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        width: 100%;
    }

    .cards-3,
    .cards-2 {
        grid-template-columns: 1fr;
    }

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

    .project-item-featured {
        padding-bottom: 0.9rem;
    }

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

    .project-end {
        position: static;
        width: auto;
        height: auto;
        background: transparent;
        justify-content: flex-start;
        border-radius: 0;
        margin-top: 0.2rem;
    }

    .project-github {
        opacity: 1;
        transform: none;
    }

    .project-item:hover .project-end {
        width: auto;
    }

    .project-item:hover .status {
        opacity: 1;
        transform: none;
    }
}

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