/* ─── Reset ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }

/* ─── Design Tokens ──────────────────────────────────── */
:root {
    --accent:       hsl(210, 100%, 65%);
    --accent2:      hsl(260, 80%, 70%);
    --glass-bg:     rgba(10, 15, 30, 0.45);
    --glass-border: rgba(255, 255, 255, 0.12);
    --text-primary: #ffffff;
    --text-muted:   rgba(255, 255, 255, 0.55);
    --avatar-size:  120px;
}

/* ─── Background ─────────────────────────────────────── */
#bg {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 25% 40%, hsl(220, 60%, 12%) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 70%, hsl(260, 50%, 10%) 0%, transparent 55%),
        linear-gradient(160deg, hsl(230, 50%, 7%) 0%, hsl(240, 45%, 5%) 100%);
    animation: bgShift 14s ease-in-out infinite alternate;
    z-index: 0;
}

@keyframes bgShift {
    0%   { filter: hue-rotate(0deg) brightness(1); }
    100% { filter: hue-rotate(15deg) brightness(1.06); }
}

/* ─── Floating Particles ─────────────────────────────── */
.particles {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(100, 180, 255, 0.25);
    animation: float linear infinite;
}

@keyframes float {
    0%   { transform: translateY(110vh) scale(0); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 0.4; }
    100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

/* ─── Main Stage ─────────────────────────────────────── */
#wrapper {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    animation: fadeIn 1s 0.2s both;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ─── Glass Card ─────────────────────────────────────── */
#card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 3.5rem 2.8rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.06) inset,
        0 32px 80px rgba(0, 0, 0, 0.55),
        0 0 60px rgba(56, 130, 255, 0.12);
    max-width: 600px;
    width: 90%;
    text-align: center;
    animation: slideUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(32px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Top accent line */
#card::before {
    content: '';
    position: absolute;
    top: 0; left: 50%; transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    border-radius: 100%;
}

/* ─── Avatar ─────────────────────────────────────────── */
.avatar-wrap {
    position: relative;
    width: var(--avatar-size);
    height: var(--avatar-size);
    margin-bottom: 1.4rem;
}

/* Spinning gradient ring */
.avatar-wrap::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: conic-gradient(
        var(--accent), var(--accent2), hsl(180, 80%, 60%), var(--accent)
    );
    animation: spinRing 6s linear infinite;
    z-index: 0;
}

/* White gap ring */
.avatar-wrap::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 50%;
    background: rgba(10, 15, 30, 0.8);
    z-index: 1;
}

@keyframes spinRing {
    to { transform: rotate(360deg); }
}

/* Pulse glow */
.avatar-glow {
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 150, 255, 0.35) 0%, transparent 70%);
    animation: pulseGlow 3s ease-in-out infinite;
    z-index: 0;
}

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

.avatar-wrap img {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* ─── Name ───────────────────────────────────────────── */
h1 {
    font-family: 'Inter', sans-serif;
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 0.55rem;
    background: linear-gradient(135deg, #ffffff 30%, hsl(210, 80%, 85%) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: slideUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.55s both;
}

/* ─── Role / Typewriter ───────────────────────────────── */
.role {
    font-family: 'Fira Code', monospace;
    font-size: clamp(0.8rem, 2vw, 0.95rem);
    font-weight: 400;
    color: var(--accent);
    letter-spacing: 0.04em;
    margin-bottom: 2rem;
    animation: slideUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.7s both;
}

.role::before { content: '> '; color: var(--text-muted); }

.role .cursor {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    background: var(--accent);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: blink 1s step-end infinite;
}

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

/* ─── Divider ────────────────────────────────────────── */
.divider {
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
    margin-bottom: 1.5rem;
    animation: slideUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.8s both;
}

/* ─── Social Links ───────────────────────────────────── */
.social-links {
    display: flex;
    gap: 1rem;
    animation: slideUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.9s both;
}

.social-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--glass-border);
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.15rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.social-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.social-btn i { position: relative; z-index: 1; }

.social-btn .btn-label {
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: opacity 0.2s, bottom 0.2s;
    opacity: 0;
}

.social-btn:hover {
    transform: translateY(-4px) scale(1.08);
    color: #fff;
    border-color: transparent;
    box-shadow:
        0 8px 24px rgba(56, 130, 255, 0.4),
        0 0 0 1px rgba(255,255,255,0.1) inset;
}

.social-btn:hover::before { opacity: 1; }
.social-btn:hover .btn-label { opacity: 1; bottom: -26px; }
.social-btn:active { transform: translateY(-1px) scale(1.02); }

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 480px) {
    #card { padding: 2.2rem 2rem 2rem; }
    :root { --avatar-size: 96px; }
}
