/* ==========================================================================
   Minimal dark profile page with an animated starfield (see stars.js).

   All colors live in :root below. To change the accent, change --accent
   (and the green star color in stars.js).
   ========================================================================== */

:root {
    color-scheme: dark;

    --bg:     #07090a;
    --ink:    #eef2ef;
    --muted:  #8d9690;
    --faint:  rgba(255, 255, 255, 0.08);
    --accent: #45d97f;

    --font: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: "Cascadia Mono", ui-monospace, "SF Mono", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 6px;
}

/* ==========================================================================
   Background
   ========================================================================== */

.bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

/* Darkens the edges so the text always stays readable. */
.vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 75% 65% at 50% 40%, transparent 20%, var(--bg) 100%);
}

.stars {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* ==========================================================================
   Content
   ========================================================================== */

.wrap {
    position: relative;
    max-width: 420px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 72px 16px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Gentle fade-in, one element after the other. */
.wrap > * {
    opacity: 0;
    animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.wrap > :nth-child(1) { animation-delay: 0.05s; }
.wrap > :nth-child(2) { animation-delay: 0.18s; }
.wrap > :nth-child(3) { animation-delay: 0.30s; }
.wrap > :nth-child(4) { animation-delay: 0.42s; }
.wrap > :nth-child(5) { animation-delay: 0.54s; }
.wrap > :nth-child(6) { animation-delay: 0.70s; }

@keyframes rise {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
}

/* ---------- Profile ---------- */

.avatar {
    display: block;
    width: 112px;
    height: 112px;
    margin: 0 auto 20px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.12),
        0 0 0 6px rgba(255, 255, 255, 0.03);
}

.name {
    margin: 0;
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.tag {
    margin: 8px 0 0;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.82rem;
    letter-spacing: 0.02em;
}

/* ---------- Accounts ---------- */

/* Icon grid. --cols is set by site.js so the rows come out even. */
.socials {
    display: grid;
    grid-template-columns: repeat(var(--cols, 6), 44px);
    gap: 6px 10px;
    margin-top: 28px;
    position: relative;
    z-index: 5;   /* keeps the Discord menu above the text below */
}

.socials > a,
.socials > button {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--muted);
    font: inherit;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
}

.socials > * > svg { width: 22px; height: 22px; fill: currentColor; }

.socials > a:hover,
.socials > a:focus-visible,
.socials > button:hover,
.socials > button:focus-visible,
.socials > button[data-state],
.socials > button[aria-expanded="true"] {
    color: var(--brand, var(--ink));
    transform: translateY(-2px);
}

/* ---------- Discord menu ---------- */

.discord-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    z-index: 10;
    width: min(280px, calc(100vw - 32px));
    padding: 6px;
    text-align: left;
    background: rgba(18, 22, 20, 0.94);
    border-radius: 14px;
    box-shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transform: translateX(-50%);
    animation: menu-in 0.16s ease-out;
}

.discord-menu[hidden] { display: none; }

@keyframes menu-in {
    from { opacity: 0; transform: translate(-50%, -4px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}

.menu-item {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 9px 12px;
    border: 0;
    border-radius: 10px;
    background: none;
    color: var(--ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s;
}

.menu-item:hover,
.menu-item:focus-visible {
    background: rgba(255, 255, 255, 0.07);
    outline: none;
}

.m-title {
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.3;
}

/* Username in monospace so characters like a trailing dot are visible. */
.menu-item[data-copy] .m-title { font-family: var(--mono); }

.m-sub {
    font-size: 0.76rem;
    color: var(--muted);
}

.menu-item:hover .m-title { color: var(--brand-discord, #7984f5); }

/* Account name under the icon row (filled in by site.js). */
.account-label {
    min-height: 1.4em;
    margin: 6px 0 0;
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--muted);
    transition: color 0.2s;
}

.account-label.done { color: var(--accent); }

/* ---------- Bio ---------- */

.about {
    max-width: 42ch;
    margin: 28px 0 0;
    color: var(--muted);
}

/* ---------- Sections ---------- */

.section {
    width: 100%;
    margin-top: 44px;
    text-align: left;
}

.section h2 {
    margin: 0 0 8px;
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

/* ---------- Projects ---------- */

.project {
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--faint);
}

.p-name {
    font-weight: 600;
    transition: color 0.2s;
}

.p-what {
    grid-column: 1;
    color: var(--muted);
    font-size: 0.88rem;
}

.p-go {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    color: var(--muted);
    transition: transform 0.2s, color 0.2s;
}

.project:hover .p-name,
.project:hover .p-go { color: var(--accent); }
.project:hover .p-go { transform: translate(2px, -2px); }


/* ---------- Footer ---------- */

.foot {
    margin-top: auto;
    padding-top: 56px;
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--muted);
    opacity: 0.6;
}

/* ---------- 404 ---------- */

.home-link {
    margin-top: 28px;
    font-size: 0.9rem;
    color: var(--muted);
    transition: color 0.2s;
}

.home-link:hover { color: var(--accent); }

/* ---------- "Copied" message ---------- */

.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    max-width: calc(100% - 32px);
    padding: 8px 16px;
    border-radius: 99px;
    background: rgba(20, 24, 22, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--ink);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, 8px);
    transition: opacity 0.2s, transform 0.2s;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ==========================================================================
   Less motion when the system asks for it
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
    .wrap > * { opacity: 1; }
}

/* ---------- Without JavaScript ---------- */

.noscript {
    max-width: 420px;
    margin: 120px auto 0;
    padding: 0 16px;
    text-align: center;
    color: var(--muted);
}
