/* ========== Глобальні стилі ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #06b6d4;
    --secondary-color: #2563eb;
    --dark-bg: #050914;
    --light-bg: #f0f7fb;
    --section-bg: #081225;
    --section-bg-alt: #0a1633;
    --text-dark: #10233f;
    --text-light: #5d7188;
    --border-color: #d8e5ef;
    --transition: 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    background-color: var(--light-bg);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== Анімації ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

/* ========== Навігація ========== */
.navbar {
    background: #050914;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    width: 170px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 500;
    transition: color var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: var(--primary-color);
    transition: width var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.language-toggle {
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
}

.language-toggle:hover {
    background: var(--primary-color);
    color: #050914;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #fff;
    margin: 5px 0;
    transition: var(--transition);
}

/* ========== Головна секція (Hero) ========== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #050914 0%, #0a1633 55%, #0369a1 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -100px;
    right: -100px;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero .subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition);
    border: none;
    cursor: pointer;
    display: inline-block;
    font-size: 1rem;
}

.btn-primary {
    background: #fff;
    color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.btn-secondary:hover {
    background: #fff;
    color: var(--primary-color);
    transform: translateY(-2px);
}

.profile-circle {
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    animation: pulse 3s ease infinite;
    margin: 0 auto;
}

/* ========== Досвід ========== */
.experience {
    padding: 5rem 0;
    background: var(--section-bg);
}

.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
}

.timeline-item {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
    margin-bottom: 3rem;
    position: relative;
}

.timeline-item:nth-child(even) .timeline-content {
    grid-column: 1;
}

.timeline-item:nth-child(odd) .timeline-content {
    grid-column: 3;
}

.timeline-marker {
    width: 20px;
    height: 20px;
    background: #fff;
    border: 4px solid var(--primary-color);
    border-radius: 50%;
    grid-column: 2;
    z-index: 2;
    transition: transform var(--transition);
}

.timeline-item:hover .timeline-marker {
    transform: scale(1.3);
    background: var(--primary-color);
}

.timeline-content {
    background: #fff;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--primary-color);
    transition: all var(--transition);
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.timeline-content h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.timeline-content .company {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-content .date {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: normal;
}

.timeline-content .description {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.skills-used {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skills-used span {
    background: var(--light-bg);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ========== Освіта ========== */
.education {
    padding: 5rem 0;
    background: var(--section-bg-alt);
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.education-card {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-top: 4px solid var(--primary-color);
    transition: all var(--transition);
    text-align: center;
}

.education-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.education-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.education-card h3 {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.education-card .school {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.education-card .year {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: normal;
}

.education-card .description {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ========== Про мене ========== */
.about {
    padding: 5rem 0;
    background: var(--section-bg-alt);
}

.about h2,
.skills h2,
.projects h2,
.contact h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    color: #fff;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text p {
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.stat {
    text-align: center;
    padding: 2rem;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform var(--transition);
}

.stat:hover {
    transform: translateY(-5px);
}

.stat h3 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat p {
    color: var(--text-light);
    font-weight: 500;
}

/* ========== Навички ========== */
.skills {
    padding: 5rem 0;
    background: var(--section-bg);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all var(--transition);
    border: 1px solid var(--border-color);
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.skill-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.skill-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.skill-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.skill-bar {
    background: var(--border-color);
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
}

.progress {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    height: 100%;
    border-radius: 3px;
    transition: width 1s ease;
}

/* ========== Проєкти ========== */
.projects {
    padding: 5rem 0;
    background: var(--section-bg-alt);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all var(--transition);
    border: 1px solid var(--border-color);
}

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

.project-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #fff;
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.project-info p {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    background: var(--light-bg);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    padding: 0.5rem;
}

.project-link:hover {
    color: var(--secondary-color);
}

/* ========== Контакт ========== */
.contact {
    padding: 5rem 0;
    background: var(--section-bg);
}

.experience h2,
.education h2 {
    color: #fff;
}

.contact-intro {
    text-align: center;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--light-bg);
    border-radius: 10px;
    transition: var(--transition);
}

.contact-item:hover {
    transform: translateX(5px);
}

.contact-item i {
    font-size: 2rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.contact-item h4 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.contact-item p {
    color: var(--text-light);
}

.contact-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.contact-item a:hover {
    color: var(--secondary-color);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-feedback {
    padding: 0.9rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    display: none;
}

.form-feedback.success {
    display: block;
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.form-feedback.error {
    display: block;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.contact-form .btn {
    align-self: flex-start;
}

/* ========== Футер ========== */
.footer {
    background: var(--dark-bg);
    color: #fff;
    padding: 3rem 0;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.social-link {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: all var(--transition);
    font-size: 1.3rem;
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-5px);
}

.visitor-counter {
    margin-bottom: 0.75rem;
}

.footer p {
    color: rgba(255, 255, 255, 0.7);
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: #050914;
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
        display: none;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .timeline-item:nth-child(even) .timeline-content,
    .timeline-item:nth-child(odd) .timeline-content {
        grid-column: 1;
    }

    .timeline-marker {
        position: absolute;
        grid-column: unset;
        left: 12px;
        top: 0;
    }

    .timeline-content {
        margin-left: 50px;
    }

    .hero .container {
        grid-template-columns: 1fr;
        padding: 2rem 0;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .profile-circle {
        width: 200px;
        height: 200px;
        font-size: 5rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .about h2,
    .skills h2,
    .projects h2,
    .contact h2 {
        font-size: 2rem;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .contact-form .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .nav-links {
        gap: 0.5rem;
    }

    .hero-content h1 {
        font-size: 1.5rem;
    }

    .hero .subtitle {
        font-size: 1rem;
    }

    .profile-circle {
        width: 150px;
        height: 150px;
        font-size: 3rem;
    }

    .about h2,
    .skills h2,
    .projects h2,
    .contact h2 {
        font-size: 1.5rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .stat h3 {
        font-size: 2rem;
    }
}
.project-image{
    overflow:hidden;
    height:220px;
    border-radius:18px 18px 0 0;
}

.project-image img{
    width:100%;
    height:100%;
    object-fit:cover;
    transition:.5s;
}

.project-card:hover img{
    transform:scale(1.06);
}
.project-image{
    height:220px;
    overflow:hidden;
    position:relative;
}

.project-image img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;

    transition:0.5s ease;
}

.project-card:hover img{
    transform:scale(1.08);
}
.project-card{

    border-radius:20px;
    overflow:hidden;

    transition:.35s;

    box-shadow:
        0 15px 40px rgba(0,0,0,.12);
}

.project-card:hover{

    transform:translateY(-8px);

    box-shadow:
        0 25px 60px rgba(0,0,0,.18);
}
.project-image::after{

    content:"";

    position:absolute;

    left:0;
    right:0;
    bottom:0;

    height:70px;

    background:
    linear-gradient(
        to top,
        rgba(0,0,0,.45),
        transparent
    );
}
.project-image{

    position:relative;
}

.project-link-preview{

    position:absolute;

    left:50%;
    top:50%;

    transform:translate(-50%,-50%);

    opacity:0;

    transition:.3s;

    background:white;

    padding:12px 24px;

    border-radius:30px;
}

.project-card:hover .project-link-preview{

    opacity:1;
}