﻿/* ==============================================
   CSS VARIABLES & DESIGN TOKENS
   ============================================== */
:root {
    /* Color Palette */
    --bg: #020617;
    --surface: #0a0f1e;
    --surface-elevated: #1e293b;
    --surface-glass: rgba(10, 15, 30, 0.8);
    /* Primary & Accents */
    --primary: #00f0ff;
    --primary-glow: rgba(0, 240, 255, 0.3);
    --accent: #6366f1;
    --accent-secondary: #14b8a6;
    /* Text Colors */
    --text: #e5e7eb;
    --text-muted: #94a3b8;
    --text-primary: var(--primary);
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary), var(--accent));
    --gradient-surface: linear-gradient(145deg, var(--surface), var(--surface-elevated));
    --gradient-hero: linear-gradient(135deg, var(--bg) 0%, hsl(222, 47%, 7%) 50%, var(--surface) 100%);
    --gradient-glow: radial-gradient(circle at center, var(--primary-glow), transparent 70%);
    /* Shadows & Effects */
    --shadow-soft: 0 4px 20px -2px rgba(11, 18, 32, 0.3);
    --shadow-glow: 0 0 40px var(--primary-glow);
    --shadow-card: 0 8px 32px -8px rgba(11, 18, 32, 0.4);
    --shadow-elevated: 0 12px 40px -4px rgba(11, 18, 32, 0.5);
    /* Typography */
    --font-family: 'Montserrat', system-ui, sans-serif;
    /* Spacing */
    --container-max-width: 1200px;
    --container-padding: 2rem;
    /* Border Radius */
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease-out;
}

/* Responsive spacing */
@media (max-width: 768px) {
    :root {
        --container-padding: 1rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    :root {
        --container-padding: 1.5rem;
    }
}

/* ==============================================
   RESET & BASE STYLES
   ============================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    font-feature-settings: "kern" 1, "liga" 1;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--surface);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* ==============================================
   ACCESSIBILITY
   ============================================== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 9999;
    border-radius: 4px;
}

    .skip-link:focus {
        top: 6px;
    }

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==============================================
   TYPOGRAPHY
   ============================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

p {
    margin-bottom: 1rem;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==============================================
   LAYOUT COMPONENTS
   ============================================== */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* ==============================================
   CARD COMPONENTS
   ============================================== */
.card {
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition);
}

@media (min-width: 768px) {
    .card {
        padding: 2rem;
    }
}

@media (min-width: 768px) {
    .card {
        padding: 2rem;
    }
}

@media (min-width: 768px) {
    .card {
        padding: 2rem;
    }
}

.glass-card {
    background: var(--surface-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--surface-elevated);
    box-shadow: var(--shadow-card);
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-elevated);
}

/* ==============================================
   BUTTON COMPONENTS
   ============================================== */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-family: inherit;
    font-weight: 500;
    text-decoration: none;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    white-space: nowrap;
}

.btn--primary {
    background: linear-gradient(145deg, var(--surface), var(--surface-elevated));
    color: var(--primary);
    border: 1px solid var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.btn--primary:hover {
    box-shadow: 0 0 25px var(--primary-glow), var(--shadow-elevated);
    transform: translateY(-2px);
}

.btn--secondary {
    background: linear-gradient(145deg, var(--surface), var(--surface-elevated));
    color: var(--text);
    border: 1px solid var(--surface-elevated);
}

.btn--secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}


.btn--small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn--full {
    width: 100%;
}

.btn--icon {
    width: 3rem;
    height: 3rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-elevated);
    border-radius: var(--radius);
}

.btn--icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.btn--icon:hover {
    background: var(--surface);
    transform: translateY(-2px);
}

/* ==============================================
   NAVIGATION
   ============================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: var(--transition);
    padding: 1rem 0;
    background: var(--surface-glass);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-soft);
}

.nav.scrolled {
    background: var(--gradient-surface);
    box-shadow: var(--shadow-elevated);
    border-bottom: 1px solid var(--surface-elevated);
}

.nav__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav__logo {
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    z-index: 1001;
    position: relative;
}

.nav__links {
    display: none;
    gap: 2rem;
}

/* Full-screen mobile navigation */
@media (max-width: 767px) {
    .nav .btn {
        display: none;
    }

    .nav__toggle {
        margin-left: auto;
        z-index: 1001;
        position: relative;
    }

    .nav__links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: linear-gradient(135deg, rgba(2, 6, 23, 0.98) 0%, rgba(10, 15, 30, 0.95) 50%, rgba(30, 41, 59, 0.98) 100%);
        backdrop-filter: blur(30px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 1.5rem;
        transform: translateX(100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        z-index: 999;
        padding: 1rem;
    }

    .nav__links.active {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }

    .nav__link {
        font-size: 1.5rem;
        font-weight: 500;
        color: var(--text);
        text-decoration: none;
        position: relative;
        opacity: 0;
        transform: translateY(30px);
        transition: all 0.3s ease;
        padding: 0.75rem 1.5rem;
        border-radius: var(--radius);
        background: linear-gradient(145deg, transparent, rgba(59, 130, 246, 0.05));
        border: 1px solid transparent;
        min-width: 200px;
        text-align: center;
    }

    .nav__links.active .nav__link {
        opacity: 1;
        transform: translateY(0);
    }

    /* Stagger animation for links */
    .nav__links.active .nav__link:nth-child(1) {
        transition-delay: 0.1s;
    }

    .nav__links.active .nav__link:nth-child(2) {
        transition-delay: 0.15s;
    }

    .nav__links.active .nav__link:nth-child(3) {
        transition-delay: 0.2s;
    }

    .nav__links.active .nav__link:nth-child(4) {
        transition-delay: 0.25s;
    }

    .nav__links.active .nav__link:nth-child(5) {
        transition-delay: 0.3s;
    }

    .nav__links.active .nav__link:nth-child(6) {
        transition-delay: 0.35s;
    }

    .nav__links.active .nav__link:nth-child(7) {
        transition-delay: 0.4s;
    }

    .nav__link:hover {
        color: var(--primary);
        background: linear-gradient(145deg, rgba(59, 130, 246, 0.1), rgba(99, 102, 241, 0.05));
        border-color: rgba(59, 130, 246, 0.3);
        transform: translateY(-3px) scale(1.02);
        box-shadow: 0 8px 25px rgba(59, 130, 246, 0.2);
    }

    .nav__link::after {
        display: none;
    }

    /* Mobile menu overlay effect */
    .nav__links::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: radial-gradient(circle at center, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
        opacity: 0;
        animation: pulseGlow 3s ease-in-out infinite;
        z-index: -1;
    }

    .nav__links.active::before {
        opacity: 1;
    }
}

/* Responsive adjustments for smaller screens */
@media (max-width: 480px) {
    .nav__links {
        gap: 1.2rem;
        padding: 0.5rem;
    }

    .nav__link {
        font-size: 1.25rem;
        padding: 0.6rem 1.2rem;
        min-width: 180px;
    }
}

@media (max-width: 360px) {
    .nav__links {
        gap: 1rem;
    }

    .nav__link {
        font-size: 1.1rem;
        padding: 0.5rem 1rem;
        min-width: 160px;
    }
}

/* Hamburger menu styling */
.nav__toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--surface-elevated);
    border: 1px solid var(--surface);
    border-radius: var(--radius);
    cursor: pointer;
    padding: 0.7rem;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    width: 50px;
    height: 50px;
    justify-content: center;
    align-items: center;
}

.nav__toggle:hover {
    background: var(--surface);
    box-shadow: var(--shadow-elevated);
    transform: scale(1.05);
}

.nav__toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: center;
}

/* Hamburger to X animation */
.nav__toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
    background: var(--primary);
}

.nav__toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.nav__toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
    background: var(--primary);
}

.nav__toggle.active {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

@media (min-width: 768px) {
    .nav__links {
        display: flex;
    }

    .nav__toggle {
        display: none;
    }

    .nav__link {
        color: var(--text-muted);
        text-decoration: none;
        font-weight: 500;
        transition: var(--transition);
        position: relative;
        font-size: 1rem;
        padding: 0;
        background: none;
        border: none;
    }

    .nav__link::after {
        content: '';
        position: absolute;
        bottom: -4px;
        left: 50%;
        width: 0;
        height: 2px;
        background: var(--primary);
        transition: var(--transition);
        transform: translateX(-50%);
    }

    .nav__link:hover,
    .nav__link.active {
        color: var(--text);
    }

    .nav__link:hover::after,
    .nav__link.active::after {
        width: 100%;
    }
}

/* Pulse glow animation for mobile menu background */
@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

/* Prevent body scroll when mobile menu is open */
body.nav-open {
    overflow: hidden;
}

/* ==============================================
   HERO SECTION
   ============================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: var(--gradient-hero);
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    background: var(--gradient-glow);
    opacity: 0.3;
    animation: float 6s ease-in-out infinite;
}

.hero__content {
    text-align: center;
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero__title {
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out;
}

/* Mobile adjustments for hero section */
@media (max-width: 768px) {
    .hero {
        align-items: flex-start;
        padding-top: 8rem;
    }

    .hero__content {
        padding-top: 2rem;
    }

    .hero__title {
        font-size: clamp(2rem, 4vw, 2.8rem);
        line-height: 1.1;
        margin-bottom: 1.5rem;
    }

    .hero__subtitle {
        font-size: 1rem;
        line-height: 1.4;
        margin-bottom: 2rem;
    }

    .hero__actions {
        margin-bottom: 2rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding-top: 6rem;
    }

    .hero__content {
        padding-top: 1.5rem;
    }

    .hero__title {
        font-size: clamp(1.8rem, 3.5vw, 2.2rem);
        line-height: 1.1;
        margin-bottom: 1.2rem;
    }

    .hero__subtitle {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: 1.5rem;
    }

    .hero__actions {
        margin-bottom: 1.5rem;
    }
}

.hero__subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero__actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero__location {
    color: var(--text-muted);
    font-size: 0.875rem;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.hero__float {
    position: absolute;
    border-radius: 50%;
    filter: blur(20px);
    animation: float 6s ease-in-out infinite;
}

.hero__float--1 {
    top: 20%;
    left: 10%;
    width: 80px;
    height: 80px;
    background: var(--primary-glow);
}

.hero__float--2 {
    bottom: 30%;
    right: 15%;
    width: 120px;
    height: 120px;
    background: rgba(124, 58, 237, 0.3);
    animation-delay: 1s;
}

.hero__float--3 {
    top: 50%;
    left: 20%;
    width: 60px;
    height: 60px;
    background: rgba(6, 182, 212, 0.3);
    animation-delay: 2s;
}

@media (min-width: 640px) {
    .hero__actions {
        flex-direction: row;
        justify-content: center;
    }
}

/* ==============================================
   ABOUT SECTION
   ============================================== */
.about {
    padding: 6rem 0;
    background: var(--gradient-surface);
}

.about__content {
    display: grid;
    gap: 3rem;
    align-items: center;
}

.about__profile {
    text-align: center;
}

.about__avatar {
    width: 200px;
    height: 200px;
    border-radius: var(--radius-xl);
    object-fit: cover;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-glow);
    transition: var(--transition);
}

.about__avatar:hover {
    transform: scale(1.05);
}

.about__name {
    margin-bottom: 0.5rem;
}

.about__role {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

.about__email {
    color: var(--text-muted);
}

.about__details-title {
    margin-bottom: 1.5rem;
}

.about__highlights {
    list-style: none;
    margin-bottom: 2rem;
}

.about__highlights li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

.about__highlights li::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    flex-shrink: 0;
}

.about__tech-title {
    margin-bottom: 1rem;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.tech-tag {
    padding: 0.5rem 1rem;
    background: var(--surface-elevated);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--primary);
    transition: var(--transition);
}

.tech-tag:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.stat {
    text-align: center;
    padding: 1rem;
    background: var(--surface-elevated);
    border-radius: var(--radius);
}

.stat__number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.stat__label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

@media (min-width: 1024px) {
    .about__content {
        grid-template-columns: 1fr 2fr;
    }

    .stats {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ==============================================
   SKILLS SECTION
   ============================================== */
.skills {
    padding: 4rem 0; /* Зменшено з 6rem */
}

.skills__grid {
    display: grid;
    gap: 1.5rem; /* Зменшено з 2rem */
    margin-bottom: 3rem; /* Зменшено з 4rem */
}

.skill-category {
    text-align: center;
}

.skill-category__header {
    margin-bottom: 1.5rem; /* Зменшено з 2rem */
}

.skill-category__icon {
    font-size: 2.5rem; /* Зменшено з 3rem */
    margin-bottom: 0.75rem; /* Зменшено з 1rem */
}

.skill-category__title {
    margin-bottom: 0.75rem; /* Зменшено з 1rem */
    font-size: 1.1rem; /* Зменшено розмір заголовка */
}

.skills-list {
    margin-bottom: 1.5rem; /* Зменшено з 2rem */
}

.skill-item {
    margin-bottom: 1rem; /* Зменшено з 1.5rem */
}

.skill-item__header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.4rem; /* Зменшено з 0.5rem */
    font-size: 0.75rem; /* Зменшено з 0.875rem */
}

.skill-bar {
    width: 100%;
    height: 6px; /* Зменшено з 8px */
    background: var(--surface-elevated);
    border-radius: 3px; /* Зменшено з 4px */
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px; /* Зменшено з 4px */
    width: 0;
    transition: width 1.5s ease-out;
}

.skill-category__average {
    padding-top: 0.75rem; /* Зменшено з 1rem */
    border-top: 1px solid var(--surface-elevated);
}

.skill-category__avg-number {
    font-size: 1.25rem; /* Зменшено з 1.5rem */
    font-weight: 700;
    color: var(--primary);
}

.skill-category__avg-label {
    font-size: 0.7rem; /* Зменшено з 0.75rem */
    color: var(--text-muted);
}

.skills__additional {
    margin-top: 3rem; /* Зменшено з 4rem */
}

.skills__additional-title {
    text-align: center;
    margin-bottom: 1.5rem; /* Зменшено з 2rem */
    font-size: 1.3rem; /* Зменшено розмір заголовка */
}

.competencies {
    display: grid;
    gap: 1.5rem; /* Зменшено з 2rem */
}

.competency h4 {
    color: var(--primary);
    margin-bottom: 0.75rem; /* Зменшено з 1rem */
    font-size: 1rem; /* Зменшено розмір заголовка */
}

.competency ul {
    list-style: none;
}

.competency li {
    color: var(--text-muted);
    margin-bottom: 0.4rem; /* Зменшено з 0.5rem */
    padding-left: 0.75rem; /* Зменшено з 1rem */
    position: relative;
    font-size: 0.8rem; /* Зменшено розмір тексту */
    line-height: 1.3; /* Додано для компактності */
}

.competency li::before {
    content: '•';
    color: var(--primary);
    position: absolute;
    left: 0;
}

/* Зменшення відступу між заголовком секції та картками */
.skills .section-header {
    margin-bottom: 2rem; /* Зменшено з 1.5rem (загальний для всіх секцій) */
}

@media (min-width: 768px) {
    .skills__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .competencies {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .skills__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ==============================================
   PROJECTS SECTION
   ============================================== */
.projects {
    padding: 4rem 0; /* Зменшено з 6rem */
    background: var(--gradient-surface);
}

.projects__grid {
    display: grid;
    gap: 1.25rem; /* Зменшено з 1.5rem */
}

.project-card {
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

.project-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: var(--gradient-glow);
    transform: translate(-50%, -50%) scale(0);
    border-radius: inherit;
    transition: var(--transition);
    z-index: -1;
    opacity: 0;
}

.project-card:hover::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.project-card:hover {
    transform: translateY(-4px); /* Зменшено з -6px */
    box-shadow: var(--shadow-glow);
}

.project-card__image {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    margin-bottom: 0.75rem; /* Зменшено з 1rem */
}

.project-card__image img {
    width: 100%;
    height: 200px; /* Зменшено з 215px */
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-card__image img {
    transform: scale(1.02); /* Зменшено з 1.03 */
}

.project-card__title {
    margin-bottom: 0.5rem; /* Зменшено з 0.75rem */
    font-size: 1.1rem; /* Зменшено з 1.25rem */
    line-height: 1.2; /* Зменшено з 1.3 */
}

.project-card__description {
    color: var(--text-muted);
    margin-bottom: 0.75rem; /* Зменшено з 1rem */
    font-size: 0.8rem; /* Зменшено з 0.9rem */
    line-height: 1.4; /* Зменшено з 1.5 */
}

.project-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem; /* Зменшено з 0.4rem */
    margin-bottom: 0.75rem; /* Зменшено з 1rem */
}

.tag {
    padding: 0.15rem 0.5rem; /* Зменшено з 0.2rem 0.6rem */
    background: var(--surface-elevated);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius);
    font-size: 0.65rem; /* Зменшено з 0.7rem */
    color: var(--primary);
    font-weight: 500;
}

.project-card__actions {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 0.5rem; /* Зменшено з 0.6rem */
}

/* Зменшення відступу між заголовком секції та картками */
.projects .section-header {
    margin-bottom: 2rem; /* Зменшено з 1.5rem (загальний для всіх секцій) */
}

/* Mobile optimizations for project cards */
@media (max-width: 767px) {
    .projects__grid {
        gap: 1rem; /* Зменшено з 1.25rem */
    }

    .project-card__image img {
        height: 160px; /* Зменшено з 200px */
    }

    .project-card__title {
        font-size: 1rem; /* Зменшено з 1.1rem */
        margin-bottom: 0.5rem; /* Зменшено з 0.6rem */
    }

    .project-card__description {
        font-size: 0.75rem; /* Зменшено з 0.85rem */
        margin-bottom: 0.6rem; /* Зменшено з 0.8rem */
    }

    .project-card__tags {
        gap: 0.25rem; /* Зменшено з 0.3rem */
        margin-bottom: 0.6rem; /* Зменшено з 0.8rem */
    }

    .tag {
        padding: 0.1rem 0.4rem; /* Зменшено з 0.15rem 0.5rem */
        font-size: 0.6rem; /* Зменшено з 0.65rem */
    }

    .project-card__actions {
        gap: 0.4rem; /* Зменшено з 0.5rem */
    }
}

@media (min-width: 768px) {
    .projects__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .projects__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Small adjustments for buttons in project cards */
.project-card .btn--small {
    padding: 0.35rem 0.7rem; /* Зменшено з 0.4rem 0.8rem */
    font-size: 0.75rem; /* Зменшено з 0.8rem */
}

.project-card .btn--icon {
    width: 2.25rem; /* Зменшено з 2.5rem */
    height: 2.25rem; /* Зменшено з 2.5rem */
}

.project-card .btn--icon svg {
    width: 0.9rem; /* Зменшено з 1rem */
    height: 0.9rem; /* Зменшено з 1rem */
}

/* ==============================================
   EXPERIENCE SECTION
   ============================================== */
.experience {
    padding: 6rem 0;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 2rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gradient-primary);
}

.timeline-item {
    position: relative;
    padding-left: 5rem;
    margin-bottom: 3rem;
}

.timeline-dot {
    position: absolute;
    left: 1.5rem;
    top: 1.5rem;
    width: 1rem;
    height: 1rem;
    background: var(--primary);
    border: 4px solid var(--bg);
    border-radius: 50%;
    box-shadow: var(--shadow-glow);
}

.timeline-content {
    padding: 2rem;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.timeline-title h3 {
    margin-bottom: 0.5rem;
}

.timeline-title h4 {
    color: var(--primary);
    font-weight: 600;
}

.timeline-period {
    text-align: right;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.timeline-highlights {
    list-style: none;
}

.timeline-highlights li {
    display: flex;
    align-items: start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

.timeline-highlights li::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    margin-top: 0.5rem;
    flex-shrink: 0;
}

.experience__highlights {
    max-width: 600px;
    margin: 0 auto;
}

.experience__highlights h3 {
    text-align: center;
    margin-bottom: 2rem;
}

.experience__highlights .stats {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 767px) {
    .timeline::before {
        left: 1rem;
    }

    .timeline-item {
        padding-left: 3rem;
    }

    .timeline-dot {
        left: 0.5rem;
    }

    .timeline-header {
        flex-direction: column;
        align-items: start;
    }

    .timeline-period {
        text-align: left;
    }
}

/* ==============================================
   SERVICES SECTION
   ============================================== */
.services {
    padding: 6rem 0;
    background: var(--gradient-surface);
}

.services__grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 4rem;
}

.service-card {
    text-align: center;
    transition: var(--transition);
    position: relative;
    background: var(--surface-glass);
    border: 1px solid var(--surface-elevated);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: var(--gradient-glow);
    transform: translate(-50%, -50%) scale(0);
    border-radius: inherit;
    transition: var(--transition);
    z-index: -1;
    opacity: 0;
}

.service-card:hover::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-glow);
}

.service-card__icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.service-card__title {
    margin-bottom: 1rem;
}

.service-card__description {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.service-card__features {
    list-style: none;
}

.service-card__features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.service-card__features li::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    flex-shrink: 0;
}

.process {
    margin-bottom: 4rem;
}

.process__title {
    text-align: center;
    margin-bottom: 3rem;
}

.process__steps {
    display: grid;
    gap: 2rem;
}

.process-step {
    text-align: center;
    position: relative;
}

.process-step__number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.process-step__title {
    margin-bottom: 1rem;
}

.process-step__description {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.services__cta {
    max-width: 800px;
    margin: 0 auto;
}

.services__cta h3 {
    text-align: center;
    margin-bottom: 1rem;
}

.services__cta p {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.services__cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

@media (min-width: 768px) {
    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .process__steps {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .services__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .process__steps {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ==============================================
   TESTIMONIALS SECTION
   ============================================== */
.testimonials {
    padding: 6rem 0;
}

.testimonials__grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 4rem;
}

.testimonial-card {
    transition: var(--transition);
}

.testimonial-card:hover {
    transform: translateY(-4px);
}

.testimonial-card__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.testimonial-card__avatar {
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    flex-shrink: 0;
}

.testimonial-card__info h4 {
    margin-bottom: 0.25rem;
}

.testimonial-card__info p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0;
}

.testimonial-card__info span {
    color: var(--primary);
    font-size: 0.75rem;
}

.testimonial-card__rating {
    margin-bottom: 1rem;
}

.star {
    color: var(--primary);
    font-size: 1.25rem;
}

.testimonial-card__quote {
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.6;
}

.testimonials__stats {
    max-width: 600px;
    margin: 0 auto;
}

.testimonials__stats .stats {
    grid-template-columns: repeat(3, 1fr);
}

@media (min-width: 768px) {
    .testimonials__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .testimonials__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==============================================
   CONTACT SECTION
   ============================================== */
.contact {
    padding: 6rem 0;
    background: var(--gradient-surface);
}

.contact__content {
    display: grid;
    gap: 3rem;
    margin-bottom: 4rem;
}

.contact__info h3 {
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-item__icon {
    width: 50px;
    height: 50px;
    background: rgba(59, 130, 246, 0.2);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-item__icon svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.contact-item__content h4 {
    margin-bottom: 0.5rem;
}

.contact-item__content p {
    color: var(--text-muted);
    margin: 0;
}

.contact-item__content span {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.contact__social {
    padding-top: 2rem;
    border-top: 1px solid var(--surface-elevated);
}

.contact__social h4 {
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--surface-elevated);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background: rgba(59, 130, 246, 0.2);
    color: var(--primary);
    transform: translateY(-2px);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

.contact__form h3 {
    margin-bottom: 2rem;
}

.contact-form {
    display: grid;
    gap: 1.5rem;
}

.form-group {
    display: grid;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: var(--text);
}

.form-group input,
.form-group textarea {
    padding: 1rem;
    background: var(--surface-elevated);
    border: 1px solid var(--surface-elevated);
    border-radius: var(--radius);
    color: var(--text);
    font-family: inherit;
    transition: var(--transition);
    resize: none;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.contact__availability {
    max-width: 600px;
    margin: 0 auto;
}

.contact__availability p {
    text-align: center;
    color: var(--text-muted);
    margin: 0;
}

@media (min-width: 1024px) {
    .contact__content {
        grid-template-columns: 1fr 1fr;
    }
}

/* ==============================================
   FOOTER
   ============================================== */
.footer {
    background: var(--surface);
    border-top: 1px solid var(--surface-elevated);
    padding: 4rem 0 2rem;
}

.footer__content {
    display: grid;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer__brand {
    max-width: 300px;
}

.footer__logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer__description {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.footer__social {
    display: flex;
    gap: 1rem;
}

.footer__links {
    display: grid;
    gap: 2rem;
}

.footer__section h4 {
    margin-bottom: 1rem;
    color: var(--text);
}

.footer__section ul {
    list-style: none;
}

.footer__section li {
    margin-bottom: 0.5rem;
}

.footer__section a,
.footer__section button {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
}

.footer__section a:hover,
.footer__section button:hover {
    color: var(--primary);
}

.footer__bottom {
    display: flex;
    justify-content: between;
    align-items: center;
    gap: 1rem;
    padding-top: 2rem;
    border-top: 1px solid var(--surface-elevated);
    font-size: 0.875rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.footer__meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer__meta a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.footer__meta a:hover {
    color: var(--primary);
}

@media (min-width: 768px) {
    .footer__content {
        grid-template-columns: 1fr 2fr;
    }

    .footer__links {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer__bottom {
        justify-content: space-between;
    }
}

/* ==============================================
   ANIMATIONS
   ============================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }

    50% {
        transform: translateY(-10px) scale(1.05);
    }
}

/* Scroll-triggered animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

    .fade-in-up.visible {
        opacity: 1;
        transform: translateY(0);
    }

/* ==============================================
   UTILITY CLASSES
   ============================================== */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 0.75rem;
}

.mt-4 {
    margin-top: 1rem;
}

.hidden {
    display: none;
}

.block {
    display: block;
}

.flex {
    display: flex;
}

.grid {
    display: grid;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

.z-10 {
    z-index: 10;
}

.z-20 {
    z-index: 20;
}

.z-30 {
    z-index: 30;
}

.overflow-hidden {
    overflow: hidden;
}

.overflow-x-hidden {
    overflow-x: hidden;
}

.pointer-events-none {
    pointer-events: none;
}

.cursor-pointer {
    cursor: pointer;
}