:root {
    --bg: #050816;
    --bg-soft: #0b1020;
    --text: #edf2ff;
    --muted: #97a1c3;
    --line: rgba(255, 255, 255, 0.08);
    --panel: rgba(12, 18, 36, 0.72);
    --accent: #7dd3fc;
    --accent-2: #67e8f9;
    --accent-3: #c4b5fd;
    --danger: #ff7d96;
    --success: #78ffb8;
    --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    --button-surface: rgba(255, 255, 255, 0.05);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(110, 231, 255, 0.12), transparent 30%),
        radial-gradient(circle at 80% 10%, rgba(130, 247, 211, 0.15), transparent 25%),
        linear-gradient(180deg, #030611 0%, #050816 35%, #050816 100%);
    font-family: "Plus Jakarta Sans", sans-serif;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    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: 80px 80px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.65), transparent 95%);
    pointer-events: none;
}

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

button,
input,
textarea {
    font: inherit;
}

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

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

.ambient,
.ambient-lines {
    position: fixed;
    inset: auto;
    pointer-events: none;
    z-index: -1;
}

.ambient {
    width: 380px;
    height: 380px;
    border-radius: 999px;
    filter: blur(80px);
    opacity: 0.16;
    animation: drift 18s ease-in-out infinite;
}

.ambient-a {
    top: 80px;
    left: -100px;
    background: #00d9ff;
}

.ambient-b {
    right: -80px;
    top: 220px;
    background: #63ffa2;
    animation-delay: -7s;
}

.ambient-lines {
    inset: 0;
    background:
        linear-gradient(transparent 0%, rgba(255, 255, 255, 0.03) 30%, transparent 100%),
        repeating-linear-gradient(
            90deg,
            transparent 0,
            transparent 100px,
            rgba(110, 231, 255, 0.09) 101px,
            transparent 102px
        );
    opacity: 0.35;
    mask-image: radial-gradient(circle at center, black 25%, transparent 90%);
}

.topbar {
    padding: 28px 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: "Syne", sans-serif;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 1.02rem;
    font-weight: 800;
}

.brand-mark {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 0 22px rgba(110, 231, 255, 0.8);
}

.spotlight-nav {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(8, 12, 25, 0.65);
    backdrop-filter: blur(18px);
    overflow: hidden;
}

.spotlight-nav::before {
    content: "";
    position: absolute;
    inset: -30px;
    background: radial-gradient(circle 140px at var(--spotlight-x, 40px) 50%, rgba(110, 231, 255, 0.24), transparent 60%);
    pointer-events: none;
}

.spotlight-nav a {
    position: relative;
    z-index: 1;
    padding: 11px 15px;
    border-radius: 999px;
    color: var(--muted);
    transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.spotlight-nav a:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-1px);
}

.hero-grid,
.auth-shell,
.dashboard-grid {
    display: grid;
    gap: 24px;
}

.hero-grid {
    padding: 52px 0 28px;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    min-height: calc(100vh - 130px);
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--accent);
    font-size: 0.92rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-title,
.auth-copy h1,
.dashboard-head h1,
.not-found h1,
.profile-panel h1 {
    margin: 0;
    font-family: "Syne", sans-serif;
    line-height: 0.98;
    letter-spacing: -0.04em;
    font-size: clamp(2.5rem, 4vw, 5.9rem);
}

.hero-text,
.auth-copy p,
.dashboard-head p,
.not-found p,
.preview-panel p,
.profile-bio,
.profile-headline {
    color: var(--muted);
    line-height: 1.75;
}

.hero-actions,
.feature-pills,
.stats-row,
.profile-badge-row,
.dock-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: var(--button-surface);
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease, background 220ms ease;
}

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

.button-label {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.button-ripple-node {
    position: absolute;
    z-index: 1;
    border-radius: 999px;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.28);
    transform: scale(0);
    opacity: 0.7;
    animation: buttonRipple 620ms ease-out forwards;
}

.button-primary {
    color: #041019;
    border-color: rgba(125, 211, 252, 0.28);
    background: linear-gradient(135deg, var(--accent), var(--accent-3));
    box-shadow: 0 18px 40px rgba(125, 211, 252, 0.16);
}

.button-primary::before {
    content: "";
    position: absolute;
    inset: auto 0 -72%;
    height: 140%;
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.58));
    transform: translateY(70%);
    transition: transform 260ms ease;
    z-index: 0;
}

.button-primary:hover::before {
    transform: translateY(28%);
}

.button-secondary,
.button-ghost {
    border-color: var(--line);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
        rgba(255, 255, 255, 0.02);
    color: var(--text);
}

.button-secondary:hover,
.button-ghost:hover {
    border-color: rgba(125, 211, 252, 0.38);
    box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.12), 0 12px 32px rgba(4, 16, 25, 0.28);
}

.button-ghost {
    min-height: 40px;
    padding: 0 14px;
    border-radius: 14px;
}

.feature-pills span,
.status-pill,
.muted-pill,
.dock-list span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 13px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
}

.panel,
.hero-preview,
.stat-card,
.profile-panel {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--panel);
    backdrop-filter: blur(18px);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.glow-card {
    position: relative;
    padding: 1px;
    border-radius: 30px;
    background:
        linear-gradient(rgba(3, 6, 17, 0.96), rgba(3, 6, 17, 0.96)) padding-box,
        conic-gradient(from 180deg, rgba(110, 231, 255, 0.75), rgba(130, 247, 211, 0.18), rgba(110, 231, 255, 0.75)) border-box;
    animation: spinGlow 8s linear infinite;
}

.hero-card {
    padding: 1px;
}

.hero-preview,
.profile-panel {
    overflow: hidden;
}

.hero-preview {
    padding: 28px;
}

.preview-top,
.mini-card {
    display: flex;
    align-items: center;
    gap: 14px;
}

.avatar {
    width: 46px;
    height: 46px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(110, 231, 255, 0.2), rgba(130, 247, 211, 0.18));
    border: 1px solid rgba(110, 231, 255, 0.3);
    color: var(--accent);
    font-family: "Unbounded", sans-serif;
}

.avatar-large {
    width: 64px;
    height: 64px;
    border-radius: 22px;
}

.avatar-xl {
    width: 94px;
    height: 94px;
    border-radius: 32px;
    margin: 0 auto;
    font-size: 2rem;
}

.preview-top p,
.mini-card p,
.profile-handle,
.profile-location {
    margin: 4px 0 0;
    color: var(--muted);
}

.status-pill {
    margin-left: auto;
    color: var(--success);
}

.hero-preview h2 {
    margin: 28px 0 12px;
    font-size: 1.7rem;
}

.preview-links {
    display: grid;
    gap: 12px;
    margin-top: 22px;
}

.preview-links a,
.profile-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.preview-links a:hover,
.profile-link:hover {
    transform: translateY(-2px);
    border-color: rgba(110, 231, 255, 0.3);
    background: rgba(255, 255, 255, 0.07);
}

.stats-row {
    margin: 0 0 80px;
}

.stat-card {
    flex: 1 1 240px;
    padding: 24px;
}

.stat-card span {
    color: var(--accent);
    font-family: "Syne", sans-serif;
    font-size: 0.88rem;
}

.stat-card strong {
    display: block;
    margin: 14px 0 12px;
    font-size: 1.15rem;
}

.auth-shell {
    padding: 44px 0 90px;
    grid-template-columns: 0.95fr 1.05fr;
    align-items: center;
}

.auth-panel,
.dashboard-form,
.preview-panel,
.not-found {
    padding: 28px;
}

.auth-panel h2,
.dashboard-section h2,
.preview-panel h2 {
    margin-top: 0;
}

label {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

label span {
    color: var(--muted);
    font-size: 0.96rem;
}

input,
textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    outline: none;
    font-weight: 500;
}

input:focus,
textarea:focus {
    border-color: rgba(110, 231, 255, 0.55);
    box-shadow: 0 0 0 4px rgba(110, 231, 255, 0.08);
}

textarea {
    resize: vertical;
}

.muted-line {
    color: var(--muted);
}

.flash {
    margin: 16px 0 20px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
}

.flash-success {
    color: var(--success);
    background: rgba(120, 255, 184, 0.08);
}

.flash-error {
    color: #ffd4dc;
    background: rgba(255, 125, 150, 0.08);
}

.dashboard-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    padding: 24px 0 22px;
}

.dashboard-grid {
    grid-template-columns: 1.2fr 0.8fr;
    padding-bottom: 80px;
    align-items: start;
}

.dashboard-form {
    display: grid;
    gap: 20px;
}

.dashboard-section {
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dashboard-section:last-of-type {
    border-bottom: 0;
}

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

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.links-editor {
    display: grid;
    gap: 12px;
}

.link-row {
    display: grid;
    gap: 12px;
    grid-template-columns: 86px 1fr 1.35fr auto;
    align-items: center;
}

.link-remove {
    min-height: 46px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 125, 150, 0.08);
    color: #ffd4dc;
    cursor: pointer;
}

.preview-panel {
    position: sticky;
    top: 24px;
}

.dock-list span {
    min-width: 52px;
    min-height: 52px;
    border-radius: 18px;
}

.public-hero {
    --profile-accent: var(--accent);
    --profile-bg: var(--bg);
    --panel-opacity: 0.72;
    min-height: calc(100vh - 120px);
    display: grid;
    place-items: center;
    padding: 40px 0 80px;
}

.profile-shell {
    width: min(560px, 100%);
}

.profile-panel {
    background:
        radial-gradient(circle at top center, color-mix(in srgb, var(--profile-accent) 20%, transparent), transparent 44%),
        linear-gradient(180deg, rgba(5, 8, 22, var(--panel-opacity)), rgba(5, 8, 22, var(--panel-opacity)));
    padding: 28px;
    text-align: center;
}

.profile-avatar-wrap {
    margin: 18px 0 20px;
}

.profile-avatar-image {
    width: 94px;
    height: 94px;
    margin: 0 auto;
    border-radius: 32px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.profile-headline {
    margin: 18px 0 10px;
    font-size: 1.05rem;
}

.profile-bio {
    margin: 0 auto;
    max-width: 44ch;
}

.profile-location {
    margin: 16px 0 0;
}

.link-stack {
    display: grid;
    gap: 12px;
    margin-top: 26px;
}

.link-icon {
    display: inline-grid;
    place-items: center;
    min-width: 42px;
    min-height: 42px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--profile-accent) 14%, rgba(255, 255, 255, 0.03));
    color: color-mix(in srgb, var(--profile-accent) 88%, white);
    border: 1px solid color-mix(in srgb, var(--profile-accent) 30%, transparent);
}

.not-found {
    margin: 70px auto;
    width: min(640px, 100%);
    text-align: center;
}

code {
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent);
}

@keyframes drift {
    0%, 100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(40px, 30px, 0);
    }
}

@keyframes spinGlow {
    0% {
        filter: hue-rotate(0deg);
    }
    100% {
        filter: hue-rotate(360deg);
    }
}

@keyframes buttonRipple {
    0% {
        transform: scale(0);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

@media (max-width: 920px) {
    .topbar,
    .dashboard-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-grid,
    .auth-shell,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .hero-grid {
        padding-top: 22px;
        min-height: auto;
    }

    .field-grid,
    .link-row {
        grid-template-columns: 1fr;
    }

    .spotlight-nav {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }
}
