﻿/* ===========================
   VARIABLES
=========================== */
:root {
    --bg: #050608;
    --bg-alt: #10121a;
    --accent: #5b8cff;
    --accent-purple: #a855f7;
    --text: #f5f5f5;
    --muted: #9ca3af;
    --radius-lg: 18px;
    --radius-full: 999px;
    --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.55);
}

/* ===========================
   GLOBAL
=========================== */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

html {
    scroll-behavior: smooth;
}

/* ===========================
   CANVAS
=========================== */
#webCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* ===========================
   HEADER
=========================== */
.main-header {
    padding: 1.5rem clamp(1.5rem, 4vw, 4rem);
    position: sticky;
    top: 0;
    background: rgba(5, 6, 8, 0.8);
    backdrop-filter: blur(20px);
    z-index: 100;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.nav {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1120px;
    margin: 0 auto;
    position: relative;
}

.nav__links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    padding: 0;
    margin: 0;
}

    .nav__links a {
        position: relative;
        color: var(--muted);
        font-size: 0.92rem;
        text-decoration: none;
        transition: color 0.3s ease;
    }

        .nav__links a::after {
            content: "";
            position: absolute;
            left: 0;
            bottom: -0.2rem;
            width: 0;
            height: 2px;
            background: linear-gradient(90deg, var(--accent), var(--accent-purple));
            border-radius: var(--radius-full);
            transition: width 0.3s ease;
        }

        .nav__links a:hover,
        .nav__links a.active {
            color: var(--text);
        }

            .nav__links a:hover::after,
            .nav__links a.active::after {
                width: 100%;
            }

.nav__toggle {
    position: absolute;
    right: 1.5rem;
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    background: transparent;
    border: none;
    cursor: pointer;
}

    .nav__toggle span {
        width: 22px;
        height: 2px;
        border-radius: var(--radius-full);
        background: #e5e7eb;
        transition: transform 0.3s ease;
    }

/* ===========================
   MAIN
=========================== */
main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5rem clamp(1.5rem, 4vw, 4rem);
    position: relative;
    z-index: 1;
}

/* ===========================
   CONTACT WRAPPER
=========================== */
.contact-wrapper {
    max-width: 760px;
    width: 100%;
    text-align: center;
    animation: fadeUp 0.9s ease-out both;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contact-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--accent);
    margin-bottom: 1rem;
}

.contact-title {
    font-size: clamp(2.4rem, 6vw, 4rem);
    font-weight: 800;
    margin: 0 0 1.2rem;
    background: linear-gradient(135deg, #fff 30%, var(--accent-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.contact-sub {
    color: var(--muted);
    font-size: 1.05rem;
    max-width: 480px;
    margin: 0 auto 3rem;
    line-height: 1.75;
}

/* ===========================
   CONTACT CARDS
=========================== */
.contact-cards {
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    padding: 1.8rem 1rem;
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.18);
    backdrop-filter: blur(14px);
    text-decoration: none;
    color: var(--text);
    /* Fixed equal size */
    width: 190px;
    min-height: 160px;
    transition: all 0.35s cubic-bezier(.22, 1, .36, 1);
    position: relative;
    overflow: hidden;
}

    .contact-card::before {
        content: "";
        position: absolute;
        inset: 0;
        opacity: 0;
        transition: opacity 0.35s ease;
        border-radius: var(--radius-lg);
    }

.contact-card--mail::before {
    background: radial-gradient(circle at center, rgba(91, 140, 255, .18), transparent 70%);
}

.contact-card--linkedin::before {
    background: radial-gradient(circle at center, rgba(10, 102, 194, .28), transparent 70%);
}

.contact-card--github::before {
    background: radial-gradient(circle at center, rgba(168, 85, 247, .18), transparent 70%);
}

.contact-card:hover::before {
    opacity: 1;
}

.contact-card:hover {
    transform: translateY(-8px) scale(1.03);
    border-color: rgba(148, 163, 184, 0.4);
    box-shadow: 0 28px 60px rgba(0, 0, 0, .5);
}

.contact-card__icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-card--mail .contact-card__icon {
    background: linear-gradient(135deg, rgba(91, 140, 255, .25), rgba(91, 140, 255, .05));
    box-shadow: 0 0 22px rgba(91, 140, 255, .3);
}

.contact-card--linkedin .contact-card__icon {
    background: linear-gradient(135deg, rgba(10, 102, 194, .3), rgba(10, 102, 194, .05));
    box-shadow: 0 0 22px rgba(10, 102, 194, .3);
}

.contact-card--github .contact-card__icon {
    background: linear-gradient(135deg, rgba(168, 85, 247, .25), rgba(168, 85, 247, .05));
    box-shadow: 0 0 22px rgba(168, 85, 247, .3);
}

.contact-card__name {
    font-weight: 700;
    font-size: 1rem;
}

.contact-card__handle {
    font-size: 0.75rem;
    color: var(--muted);
    word-break: break-all;
    text-align: center;
}

/* ===========================
   DIVIDER
=========================== */
.contact-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--muted);
    font-size: 0.82rem;
    margin: 0 auto 2.5rem;
    max-width: 300px;
}

    .contact-divider::before,
    .contact-divider::after {
        content: "";
        flex: 1;
        height: 1px;
        background: rgba(148, 163, 184, .18);
    }

/* ===========================
   CTA BUTTON
=========================== */
.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 2rem;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--accent), var(--accent-purple));
    color: #f9fafb;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 35px rgba(91, 140, 255, .35);
}

    .btn-cta::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        border-radius: 50%;
        background: rgba(255, 255, 255, .18);
        transform: translate(-50%, -50%);
        transition: width .6s, height .6s;
    }

    .btn-cta:hover::before {
        width: 400px;
        height: 400px;
    }

    .btn-cta:hover {
        transform: translateY(-4px);
        box-shadow: 0 22px 55px rgba(91, 140, 255, .5);
    }

/* ===========================
   FOOTER
=========================== */
.main-footer {
    background: #111;
    color: #eee;
    text-align: center;
    padding: 2rem 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    position: relative;
    z-index: 1;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
}

.footer-name {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.footer-mail a {
    color: #eee;
    text-decoration: none;
    transition: color 0.3s;
}

    .footer-mail a:hover {
        color: var(--accent);
    }

.footer-links {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn--footer {
    background: #222;
    color: #eee;
    padding: 0.6rem 1.2rem;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s;
}

    .btn--footer:hover {
        background: linear-gradient(135deg, var(--accent), var(--accent-purple));
        transform: translateY(-3px);
    }

/* ── LANG SWITCHER ── */
#langSwitcher {
    display: flex;
    gap: .4rem;
    align-items: center;
    position: absolute;
    left: 0;
}

.lang-btn {
    background: transparent;
    border: 2px solid transparent;
    border-radius: 6px;
    padding: 2px;
    cursor: pointer;
    opacity: .5;
    transition: opacity .2s, border-color .2s, transform .2s;
    line-height: 0;
}

    .lang-btn img {
        width: 28px;
        height: 20px;
        object-fit: cover;
        border-radius: 3px;
        display: block;
    }

    .lang-btn:hover {
        opacity: .85;
        transform: scale(1.08);
    }

    .lang-btn.active {
        opacity: 1;
        border-color: var(--accent);
    }

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 768px) {
    .nav {
        justify-content: flex-end;
    }

    #langSwitcher {
        position: absolute;
        left: 0;
        right: auto;
    }

    .nav__toggle {
        display: flex;
    }

    .nav__links {
        position: absolute;
        inset: 64px 1.5rem auto;
        padding: 0.8rem 1rem;
        flex-direction: column;
        gap: 0.6rem;
        background: rgba(15, 23, 42, 0.96);
        border-radius: 14px;
        backdrop-filter: blur(14px);
        transform-origin: top;
        transform: scaleY(0);
        opacity: 0;
        pointer-events: none;
        transition: 0.15s ease;
    }

    .nav__links--open {
        transform: scaleY(1);
        opacity: 1;
        pointer-events: auto;
    }

    .contact-card {
        width: 140px;
        min-height: 150px;
    }
}
