:root {
    color-scheme: dark;
    --background: #05070a;
    --surface: rgba(13, 19, 27, 0.82);
    --surface-strong: #0d141c;
    --border: rgba(148, 163, 184, 0.18);
    --primary: #68f0a8;
    --primary-strong: #43d991;
    --primary-soft: rgba(104, 240, 168, 0.12);
    --text: #eef6ff;
    --text-muted: #94a3b8;
    --danger: #ff9d9d;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
}

body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 50% 20%, rgba(104, 240, 168, 0.09), transparent 30rem),
        linear-gradient(180deg, #070b11 0%, var(--background) 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
    font: inherit;
}

.stars {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.stars-small {
    opacity: 0.48;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0 1px, transparent 1.2px);
    background-size: 85px 85px;
    animation: drift 70s linear infinite;
}

.stars-large {
    opacity: 0.24;
    background-image: radial-gradient(circle, var(--primary) 0 1.5px, transparent 1.8px);
    background-position: 30px 20px;
    background-size: 190px 190px;
    animation: drift 110s linear infinite reverse;
}

.ambient-glow {
    position: fixed;
    top: 18%;
    left: 50%;
    width: 34rem;
    height: 34rem;
    border-radius: 50%;
    background: rgba(104, 240, 168, 0.06);
    filter: blur(90px);
    pointer-events: none;
    transform: translateX(-50%);
}

.portal {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 2rem 1rem;
}

.login-card {
    position: relative;
    z-index: 1;
    width: min(100%, 31rem);
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 2rem;
    padding: 2rem;
    background: var(--surface);
    box-shadow: 0 2rem 6rem rgba(0, 0, 0, 0.45), inset 0 1px rgba(255, 255, 255, 0.035);
    backdrop-filter: blur(18px);
}

.login-card::before {
    position: absolute;
    top: 0;
    left: 15%;
    width: 70%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    content: "";
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(104, 240, 168, 0.22);
    border-radius: 999px;
    padding: 0.42rem 0.72rem;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.status-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0.75rem var(--primary);
}

.eyebrow {
    margin: 2rem 0 0.45rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    max-width: 100%;

    color: var(--text);

    font-size: clamp(2rem, 7vw, 3.35rem);
    font-weight: 800;
    letter-spacing: 0.035em;
    line-height: 1;

    text-wrap: balance;
}

.subtitle {
    max-width: 25rem;
    margin: 1rem 0 1.75rem;
    color: var(--text-muted);
    line-height: 1.65;
}

.login-form {
    display: grid;
    gap: 1rem;
}

.field {
    display: grid;
    gap: 0.5rem;
    color: #cbd5e1;
    font-size: 0.85rem;
    font-weight: 650;
}

.field input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 0.9rem;
    outline: 0;
    padding: 0.95rem 1rem;
    background: var(--surface-strong);
    color: var(--text);
    transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.field input::placeholder {
    color: #596779;
}

.field input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
    transform: translateY(-1px);
}

.login-form button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-height: 3.2rem;
    margin-top: 0.25rem;
    border: 0;
    border-radius: 0.9rem;
    padding: 0.85rem 1rem;
    background: linear-gradient(100deg, var(--primary-strong), var(--primary));
    color: #03110a;
    cursor: pointer;
    font-weight: 800;
    transition: box-shadow 150ms ease, transform 150ms ease;
}

.login-form button:hover {
    box-shadow: 0 0.8rem 2.2rem rgba(104, 240, 168, 0.2);
    transform: translateY(-2px);
}

.login-form button:focus-visible,
.project-link:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
}

.login-message {
    min-height: 1.4rem;
    margin: 1rem 0 0;
    color: var(--danger);
    font-size: 0.88rem;
    line-height: 1.5;
    text-align: center;
}

.login-message.is-visible {
    animation: message-in 220ms ease-out;
}

.divider {
    height: 1px;
    margin: 1.2rem 0;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.disclaimer {
    margin: 0 0 1rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: center;
}

.project-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 0.95rem 1rem;
    background: rgba(255, 255, 255, 0.025);
    color: var(--text-muted);
    text-decoration: none;
    transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.project-link span:first-child {
    display: grid;
    gap: 0.18rem;
}

.project-link strong {
    color: var(--primary);
}

.project-link:hover {
    border-color: rgba(104, 240, 168, 0.4);
    background: var(--primary-soft);
    color: var(--text);
    transform: translateY(-2px);
}

footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.4rem;
    color: #596779;
    font-size: 0.7rem;
}

@keyframes drift {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(-85px, -85px, 0); }
}

@keyframes breathe {
    0%, 100% { opacity: 0.94; }
    50% { opacity: 1; }
}

@keyframes message-in {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 540px) {
    .portal {
        padding: 1rem;
    }

    .login-card {
        border-radius: 1.5rem;
        padding: 1.4rem;
    }

    footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

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