:root {
    --accent: #B21752;
    --accent-light: #ff3b6f;
    --soft-lavender: #E6ACC6;
    --muted-purple: #A3659E;
    --deep-purple: #3C1A40;
    --blue-purple: #5E3584;
    --background: #FAF8FB;
    --black: #121212;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--background);
    color: var(--deep-purple);
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 16px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(250,248,251,0.9);
    backdrop-filter: blur(12px);
    z-index: 10;
}

.logo {
    font-size: 22px;
    font-weight: 700;
    color: var(--blue-purple);
    letter-spacing: 0.5px;
}

/*=====logo animation====*/
.logo-dot {
    display: inline-block;
    color: var(--accent);
    transform-origin: center;
    will-change: transform, color, text-shadow;
    animation: dotPulse 1.1s ease-in-out infinite;
}

@keyframes dotPulse {
    0% {
        color: var(--black);
        text-shadow: none;
    }
    50% {
        color: var(--accent-light);
        text-shadow: 0 0 14px rgba(205, 29, 96, 0.58);
    }
    100% {
        color: var(--black);
        text-shadow: none;
    }
}

nav a {
    margin: 0 16px;
    text-decoration: none;
    color: var(--deep-purple);
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

.discord-btn {
    padding: 10px 18px;
    border-radius: 12px;
    border: none;
    background: var(--accent);
    color: white;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.discord-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(178,23,82,0.3);
}

/* ===== HERO ===== */
.hero {
    height: 100vh;
    padding: 0 10%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    animation: heroFade 1.2s ease forwards;
    position: relative;
}

.hero-title {
    font-size: 52px;
    max-width: 720px;
}

.hero-subtitle {
    margin-top: 20px;
    font-size: 18px;
    color: var(--blue-purple);
}

/* ===== SECTIONS ===== */
.section {
    padding: 120px 10%;
}

.section h2 {
    font-size: 34px;
    margin-bottom: 24px;
}

.section p {
    max-width: 620px;
}

/* ===== PROJECTS ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
}

.project-card {
    background: white;
    padding: 28px;
    border-radius: 20px;
    border: 1px solid #eee;
    cursor: pointer;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 45px rgba(0,0,0,0.08);
}

.project-card h3 {
    color: var(--accent);
    margin-bottom: 8px;
}

/* ===== CONTACT ===== */
.contact-btn {
    padding: 16px 32px;
    border-radius: 16px;
    border: none;
    background: var(--muted-purple);
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

.contact-btn:hover {
    background: var(--accent);
    transform: translateY(-2px);
}

/* ===== CONTACT FORM ===== */
.contact-form {
    max-width: 520px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-form input,
.contact-form textarea {
    padding: 14px 18px;
    border-radius: 14px;
    border: 1px solid #ddd;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border 0.3s, box-shadow 0.3s;
}

.contact-form textarea {
    min-height: 120px;
    resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(178, 23, 82, 0.15);
}

.form-status {
    font-size: 14px;
    color: var(--blue-purple);
}

/* ===== FOOTER ===== */
footer {
    text-align: center;
    padding: 48px;
    color: #888;
}

/* ===== ANIMATIONS ===== */
.fade {
    opacity: 0;
    transform: translateY(40px);
    transition: 0.9s ease;
}

.fade.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes heroFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/*======== Navbar Shadow======== */
.navbar.scrolled {
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    background: rgba(250,248,251,0.96);
    transition: box-shadow 0.28s ease, background 0.28s ease;
}

/* =======Scroll indicator ===== */
.scroll-indicator {
    position: absolute;
    left: 50%;
    /* Начальная позиция */
    transform: translateX(-50%) translateY(0);
    bottom: 28px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    pointer-events: none;

    /* ИЗМЕНЕНО: Ставим 1 по умолчанию, чтобы после анимации контроль вернулся к CSS */
    opacity: 1;
    /* Убрали 'forwards', чтобы анимация не блокировала свойства после завершения */
    animation: indicatorFadeIn 0.9s ease;

    /* Плавный переход для скрытия */
    transition: opacity 0.45s ease, transform 0.45s ease;
    z-index: 5;
}

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

.scroll-indicator.hide {
    /* Останавливаем анимацию входа, если она еще идет, чтобы сработал transition */
    animation: none;
    opacity: 0;
    /* Сдвигаем немного вниз при исчезновении */
    transform: translateX(-50%) translateY(10px);
    pointer-events: none;
}
/* ====Mouse ===== */
.mouse {
    width: 36px;
    height: 56px;
    border-radius: 18px;
    border: 2px solid rgba(178,23,82,0.16);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    box-sizing: border-box;
    padding-top: 8px;
}

.mouse .wheel {
    width: 4px;
    height: 10px;
    background: var(--accent-light);
    border-radius: 2px;
    animation: wheelMove 1.6s cubic-bezier(.2,.8,.2,1) infinite;
}

/* ====== Wheel smooth ======*/
@keyframes wheelMove {
    0%   { transform: translateY(0); opacity: 1; }
    50%  { transform: translateY(10px); opacity: 0.35; }
    100% { transform: translateY(0); opacity: 1; }
}

.scroll-text {
    font-size: 13px;
    color: var(--blue-purple);
    font-weight: 600;
    opacity: 0.95;
    pointer-events: none;
}

/* ===== TECH STACK ===== */
.tech-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    margin-top: 32px;
}

.tech-card {
    background: white;
    border-radius: 16px;
    padding: 18px 22px;
    text-align: center;
    font-weight: 500;
    color: var(--deep-purple);
    border: 1px solid #eee;
    cursor: default;

    animation: stackFadeUp 0.8s ease forwards;
    opacity: 0;
}

.tech-card span {
    color: var(--accent);
    font-size: 15px;
    letter-spacing: 0.3px;
}

/* stagger animation */
.tech-card:nth-child(1) { animation-delay: 0.05s; }
.tech-card:nth-child(2) { animation-delay: 0.1s; }
.tech-card:nth-child(3) { animation-delay: 0.15s; }
.tech-card:nth-child(4) { animation-delay: 0.2s; }
.tech-card:nth-child(5) { animation-delay: 0.25s; }
.tech-card:nth-child(6) { animation-delay: 0.3s; }
.tech-card:nth-child(7) { animation-delay: 0.35s; }
.tech-card:nth-child(8) { animation-delay: 0.4s; }

@keyframes stackFadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
