/* ==========================================================================
   1. ІМПОРТ ШРИФТІВ ТА ЗМІННІ
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;700;900&display=swap');

:root {
    --bg-dark: #121420;
    --card-bg: rgba(255, 255, 255, 0.95);
    --accent: #6c63ff;
    --iris-1: #00ffff;
    --iris-2: #ff00ff;
}

/* ==========================================================================
   2. ГЛОБАЛЬНІ СТИЛІ ТА АНІМАЦІЇ СТОРІНКИ
   ========================================================================== */
body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    padding-top: 110px;
    color: white;
    background: var(--bg-dark);
    background-image: 
        radial-gradient(at 10% 10%, rgba(108, 99, 255, 0.2) 0px, transparent 50%),
        radial-gradient(at 90% 90%, rgba(0, 255, 255, 0.15) 0px, transparent 50%);
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    opacity: 0;
    animation: fadeInPage 0.8s ease-in-out forwards;
    letter-spacing: -0.01em;
}

p, span, li, a, div, .tile-content, .bio-text {
    font-family: 'Inter', sans-serif;
}

h1, h2, h3, h4, h5, h6, .page2-title, .subtitle {
    font-family: 'Space Grotesk', sans-serif !important;
    letter-spacing: -0.02em;
}

@keyframes fadeInPage { from { opacity: 0; } to { opacity: 1; } }

/* ==========================================================================
   3. РОЗУМНА ШАПКА ТА ЛОГОТИП (STICKY HEADER)
   ========================================================================== */
header { 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex; 
    align-items: center; 
    padding: 20px 40px;
    background: rgba(10, 10, 15, 0.6); 
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    box-sizing: border-box;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.logo-container { display: flex; align-items: center; gap: 12px; cursor: pointer; transition: 0.3s; }
.logo-container:hover { opacity: 0.8; }

.logo-img { 
    width: auto;
    height: 50px;
    object-fit: cover; 
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 10px rgba(100, 100, 255, 0.3);
    transition: all 0.4s ease;
}

.logo-text-group { display: flex; flex-direction: column; line-height: 1.1; }

.logo-see { 
    font-family: 'Space Grotesk', sans-serif !important;
    font-weight: 900; 
    font-size: 1.4em; 
    letter-spacing: 3px;
    background: linear-gradient(to right, var(--iris-1), var(--iris-2));
    background-clip: text; 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent;
    transition: all 0.4s ease;
}

.logo-full { 
    font-size: 0.65em; 
    color: rgba(255, 255, 255, 0.6); 
    letter-spacing: 1.5px; 
    text-transform: uppercase; 
    font-weight: 400; 
    transition: all 0.3s ease, width 0.3s ease;
    white-space: nowrap;
}

header.scrolled {
    padding: 10px 40px;
    background: rgba(10, 10, 15, 0.92);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

header.scrolled .logo-img {
    height: 35px;
}

header.scrolled .logo-see {
    font-size: 1.15em;
}

header.scrolled .logo-full {
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    width: 0;
    margin: 0;
}

/* ==========================================================================
   4. СТРУКТУРА MAIN ТА ОСНОВНІ СЕКЦІЇ
   ========================================================================== */
main { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    padding: 40px 20px; 
    width: 100%; 
    box-sizing: border-box; 
}

.about-me { 
    position: relative;
    margin: 10px auto 40px auto; 
    max-width: 800px; 
    text-align: center; 
    padding: 20px; 
}
.about-me h1 { 
    font-weight: 700;
    font-size: 2.7em; 
    margin-bottom: 20px;
    background: linear-gradient(to right, var(--iris-1), var(--iris-2));
    background-clip: text; 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.03em;
}
.about-me p { font-size: 1.15em; color: rgba(255, 255, 255, 0.8); line-height: 1.7; font-weight: 300; }

.card.main-hero {
    background: var(--card-bg); color: black; padding: 60px; border-radius: 20px; text-align: center; max-width: 800px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.nav-link { 
    display: inline-block; margin-top: 30px; padding: 15px 30px; 
    background-color: var(--accent); color: white; text-decoration: none; 
    border-radius: 8px; font-weight: 600; transition: all 0.3s ease; 
    border: 1px solid rgba(255, 255, 255, 0.1);
    letter-spacing: 0.02em;
}
.nav-link:hover { transform: scale(1.05); background-color: #7b73ff; box-shadow: 0 0 15px rgba(108, 99, 255, 0.6); }

.tiles-section { display: flex; gap: 30px; max-width: 1000px; width: 100%; justify-content: center; flex-wrap: wrap; z-index: 2; margin-bottom: 40px; }
.tile { flex: 1; min-width: 250px; background: var(--card-bg); color: black; border-radius: 15px; overflow: hidden; transition: 0.4s ease; cursor: pointer; }
.tile img { width: 100%; height: 150px; object-fit: cover; }
.tile.hover-effect:hover { transform: scale(1.05); box-shadow: 0 15px 40px rgba(108, 99, 255, 0.4); }
.tile-content { padding: 25px; font-weight: 600; text-align: center; color: #1a1a1a; font-size: 1.05em; }
.tile-content p { line-height: 1.6; margin-top: 10px; font-weight: 400; }

.skills { margin-top: 25px; display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
.skills span { font-weight: 500; background: rgba(255, 255, 255, 0.1); padding: 6px 16px; border-radius: 20px; font-size: 0.85em; border: 1px solid rgba(255, 255, 255, 0.2); color: white; transition: 0.3s; }
.skills span:hover { background: var(--accent); }

.tile .skills span { background: rgba(0, 0, 0, 0.08); color: #333; border: 1px solid rgba(0, 0, 0, 0.1); }
.tile .skills span:hover { background: var(--accent); color: white; }

/* ==========================================================================
   5. НОВІ СЕКЦІЯ: SERVICES ТА WORKFLOW (КАРТКИ В РЯДОК)
   ========================================================================== */
.section-title {
    font-size: 2.2em;
    font-weight: 700;
    text-align: center;
    margin: 70px 0 35px 0;
    background: linear-gradient(to right, #6c63ff, #00ffff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
    width: 100%;
}

.services-section { width: 100%; max-width: 1000px; margin-bottom: 20px; }
.services-grid { display: flex; gap: 25px; width: 100%; justify-content: center; }

.service-card {
    flex: 1;
    min-width: 250px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 30px 25px;
    text-align: left;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.service-icon { font-size: 2.2em; margin-bottom: 15px; }
.service-card h3 { font-size: 1.4em; color: white; margin: 0 0 12px 0; }
.service-card p { color: rgba(255, 255, 255, 0.65); font-size: 0.95em; line-height: 1.6; font-weight: 300; margin: 0; }

.service-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.06);
    border-color: #00ffff;
    box-shadow: 0 15px 30px rgba(0, 255, 255, 0.15);
}

.workflow-section { width: 100%; max-width: 1000px; margin-bottom: 120px; }
.workflow-steps { display: flex; gap: 25px; width: 100%; justify-content: center; margin-top: 20px; }

.step-card {
    flex: 1;
    min-width: 250px;
    position: relative;
    background: rgba(108, 99, 255, 0.03);
    border: 1px solid rgba(108, 99, 255, 0.15);
    border-radius: 16px;
    padding: 40px 25px 25px 25px;
    transition: all 0.4s ease;
    text-align: left;
}
.step-num {
    position: absolute;
    top: -15px;
    left: 25px;
    background: linear-gradient(135deg, #6c63ff, #ff007f);
    color: white;
    font-family: 'Space Grotesk', sans-serif !important;
    font-weight: 700;
    font-size: 0.85em;
    padding: 4px 14px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(108, 99, 255, 0.3);
}
.step-card h4 { font-size: 1.3em; color: white; margin: 10px 0 10px 0; }
.step-card p { color: rgba(255, 255, 255, 0.6); font-size: 0.95em; line-height: 1.6; font-weight: 300; margin: 0; }

.step-card:hover {
    border-color: #ff007f;
    background: rgba(108, 99, 255, 0.07);
    box-shadow: 0 15px 35px rgba(255, 0, 127, 0.15);
}

/* ==========================================================================
   6. ФІКСОВАНИЙ БЛОК КОНТАКТІВ (ІНСТА + ТЕЛЕГРАМ)
   ========================================================================== */
.contacts-fixed-group {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: flex-end; 
    gap: 8px;
}

.contacts-label {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.4); 
    font-weight: 700;
    margin-right: 5px; 
}

.contacts-buttons { display: flex; gap: 12px; }

.telegram-float, .instagram-float {
    color: white !important;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.telegram-float { background-color: #24A1DE; box-shadow: 0 4px 15px rgba(36, 161, 222, 0.3); }
.instagram-float { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); box-shadow: 0 4px 15px rgba(220, 39, 67, 0.25); }
.tg-icon, .insta-icon { width: 18px; height: 18px; fill: white; }

.telegram-float:hover, .instagram-float:hover { transform: translateY(-4px); opacity: 0.95; }
.telegram-float:hover { box-shadow: 0 8px 25px rgba(36, 161, 222, 0.5); }
.instagram-float:hover { box-shadow: 0 8px 25px rgba(220, 39, 67, 0.45); }

/* ==========================================================================
   7. СТИЛІ ІНШИХ СТОРІНОК (ТАЙМЛАЙН ТА ПРОФІЛЬ)
   ========================================================================== */
.timeline-container { padding: 50px 20px; max-width: 700px; margin: 0 auto; width: 100%; }
.timeline { position: relative; padding-left: 40px; }
.timeline::before {
    content: ''; position: absolute; left: 10px; top: 10px; bottom: 10px;
    width: 3px; background: rgba(255, 255, 255, 0.2); border-radius: 2px;
}
.timeline-item { position: relative; margin-bottom: 40px; transition: 0.3s; }
.dot {
    position: absolute; left: -35px; top: 5px; width: 14px; height: 14px;
    background-color: var(--accent); border: 3px solid var(--bg-dark);
    border-radius: 50%; z-index: 2; transition: 0.3s;
}
.timeline-item:hover .dot { background-color: var(--iris-1); box-shadow: 0 0 15px var(--iris-1); transform: scale(1.2); }
.timeline-item h3 { margin: 0 0 5px 0; color: white; font-size: 1.4em; transition: 0.3s; }
.timeline-item:hover h3 { color: var(--iris-1); }
.timeline-item p { color: rgba(255, 255, 255, 0.7); margin: 0; line-height: 1.6; font-weight: 300; }
.page2-title { text-align: center; margin-bottom: 40px; font-size: 2em; font-weight: 700; }

.profile-card { background: rgba(255, 255, 255, 0.05); padding: 40px; border-radius: 20px; border: 1px solid rgba(255, 255, 255, 0.1); max-width: 600px; text-align: center; margin-top: 20px; }
.status-badge { background: rgba(0, 255, 255, 0.1); color: var(--iris-1); padding: 5px 15px; border-radius: 20px; font-size: 0.9em; display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; font-weight: 500; }
.pulse { width: 10px; height: 10px; background: var(--iris-1); border-radius: 50%; box-shadow: 0 0 10px var(--iris-1); animation: pulse 2s infinite; }
@keyframes pulse { 0% { transform: scale(0.95); opacity: 1; } 50% { transform: scale(1.3); opacity: 0.7; } 100% { transform: scale(0.95); opacity: 1; } }
.focus-grid { display: flex; gap: 20px; margin-top: 20px; justify-content: center; }
.focus-item { background: linear-gradient(135deg, var(--accent), var(--iris-1)); padding: 15px 25px; border-radius: 10px; color: white; font-weight: bold; }
.bio-text { margin-top: 20px; line-height: 1.8; color: rgba(255, 255, 255, 0.8); font-weight: 300; }

.cyber-orb-container {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    z-index: -1; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; pointer-events: none;
}
.cyber-orb {
    width: 260px; height: 260px; border-radius: 50%; background: linear-gradient(135deg, var(--iris-1), var(--iris-2));
    opacity: 0.28; filter: blur(25px); box-shadow: 0 0 40px var(--iris-1), 0 0 80px var(--iris-2); animation: floatOrb 6s ease-in-out infinite;
}
@keyframes floatOrb { 0% { transform: translateY(0px) scale(1); } 50% { transform: translateY(-12px) scale(1.04); } 100% { transform: translateY(0px) scale(1); } }

/* ==========================================================================
   8. МЕДІА-ЗАПИТИ (АДАПТИВНІСТЬ ДЛЯ МОБІЛОК)
   ========================================================================== */
@media (max-width: 820px) {
    .services-grid, .workflow-steps { flex-direction: column; }
    .service-card, .step-card { width: 100%; box-sizing: border-box; }
    .step-card { margin-top: 20px; }
}

@media (max-width: 480px) { 
    body { padding-top: 90px; }
    header { padding: 10px 20px; }
    header.scrolled { padding: 8px 20px; }
    .tiles-section { flex-direction: column; } 
    .card.main-hero { padding: 25px 15px; } 
    .about-me h1 { font-size: 2em; }
    .focus-grid { flex-direction: column; }
    .cyber-orb { width: 180px; height: 180px; }
    .contacts-fixed-group { bottom: 15px; right: 15px; gap: 5px; }
    .contacts-label { font-size: 0.65em; }
    .telegram-float, .instagram-float { padding: 8px 14px; font-size: 0.8em; }
}

/* ==========================================================================
   9. СТИЛЬНА ФОРМА ЗВОРОТНОГО ЗВ'ЯЗКУ
   ========================================================================== */
.contact-section {
    width: 100%;
    max-width: 650px;
    margin: 60px auto 100px auto;
    text-align: center;

    /* Анімація появи при скролі */
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.contact-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.contact-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.05em;
    margin-bottom: 40px;
    font-weight: 300;
}

.contact-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.input-group {
    position: relative;
    margin-bottom: 35px;
    text-align: left;
}

.input-group input, .input-group textarea {
    width: 100%;
    padding: 12px 0;
    font-family: 'Inter', sans-serif;
    font-size: 1em;
    color: white;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    outline: none;
    transition: 0.3s;
    resize: none;
}

.input-group label {
    position: absolute;
    top: 12px;
    left: 0;
    font-family: 'Inter', sans-serif;
    color: rgba(255, 255, 255, 0.4);
    transition: 0.3s ease all;
    pointer-events: none;
    font-weight: 300;
}

.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label,
.input-group textarea:focus ~ label,
.input-group textarea:not(:placeholder-shown) ~ label {
    top: -18px;
    font-size: 0.8em;
    color: var(--iris-1);
    font-weight: 600;
    letter-spacing: 1px;
}

.input-line {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: linear-gradient(to right, var(--iris-1), var(--iris-2));
    transition: 0.4s ease;
}

.input-group input:focus ~ .input-line,
.input-group textarea:focus ~ .input-line {
    width: 100%;
}

.form-btn {
    position: relative;
    width: 100%;
    padding: 15px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    overflow: hidden;
    transition: 0.3s;
}

.form-btn span {
    position: relative;
    z-index: 2;
}

.form-btn:hover {
    background: #7b73ff;
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(108, 99, 255, 0.6);
}

.form-status-msg {
    margin-top: 20px;
    font-size: 0.95em;
    font-weight: 500;
    transition: 0.3s;
}
.form-status-msg.success { color: #00ffcc; text-shadow: 0 0 10px rgba(0, 255, 204, 0.3); }
.form-status-msg.error { color: #ff007f; text-shadow: 0 0 10px rgba(255, 0, 127, 0.3); }