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

:root {
    --primary-color: #0066cc;
    --secondary-color: #00b4d8;
    --accent-color: #ff6b35;
    --text-dark: #2d3748;
    --text-light: #718096;
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    --gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

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

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

/* Hero Section */
.hero-section {
    min-height: 70vh;
    display: flex;
    align-items: center;
    position: relative;
    background: var(--gradient);
    color: white;
    overflow: hidden;
    padding: 60px 0;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    width: 100%;
    z-index: 2;
    padding: 40px 0;
}

/* ОНОВЛЕНО - Додано відступи зліва та зправа для блоку привітання */
.greeting {
    padding-left: 3rem;  /* Додано відступ зліва */
    padding-right: 3rem; /* Відступ зправа */
}

.greeting h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
}

.highlight {
    color: var(--accent-color);
    text-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
}

.subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    opacity: 0.9;
    opacity: 0;
    animation: fadeInUp 1s ease 0.3s forwards;
}

.hero-visual {
    position: relative;
    height: 300px;
}

.floating-elements {
    position: relative;
    width: 100%;
    height: 100%;
}

.floating-element {
    position: absolute;
    font-size: 3rem;
    opacity: 0.8;
    animation: float 6s ease-in-out infinite;
    animation-delay: var(--delay);
}

.floating-element:nth-child(1) {
    top: 20%;
    left: 20%;
}

.floating-element:nth-child(2) {
    top: 50%;
    right: 30%;
}

.floating-element:nth-child(3) {
    top: 70%;
    left: 40%;
}

/* Sections */
section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    position: relative;
}

.section-line {
    width: 80px;
    height: 4px;
    background: var(--gradient);
    margin: 0 auto;
    border-radius: 2px;
}

/* About Section */
.about-section {
    background: var(--bg-white);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-light);
}

/* Tech Section */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.tech-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.tech-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    opacity: 0.1;
    transition: left 0.5s ease;
}

.tech-card:hover::before {
    left: 0;
}

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

.tech-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.tech-card:hover .tech-icon {
    color: var(--accent-color);
    transform: scale(1.1);
}

.tech-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.tech-card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Visual Section */
.visual-section {
    background: var(--bg-white);
}

.code-visualization {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.code-window {
    background: #1e1e1e;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.window-controls {
    background: #2d2d2d;
    padding: 15px 20px;
    display: flex;
    gap: 10px;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.control.close {
    background: #ff5f57;
}

.control.minimize {
    background: #ffbd2e;
}

.control.maximize {
    background: #28ca42;
}

.code-content {
    padding: 20px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
}

.code-line {
    display: flex;
    margin-bottom: 8px;
    opacity: 0;
    animation: typeWriter 0.5s ease forwards;
}

.code-line:nth-child(1) { animation-delay: 0.5s; }
.code-line:nth-child(2) { animation-delay: 1s; }
.code-line:nth-child(3) { animation-delay: 1.5s; }
.code-line:nth-child(4) { animation-delay: 2s; }
.code-line:nth-child(5) { animation-delay: 2.5s; }

.line-number {
    color: #858585;
    margin-right: 20px;
    min-width: 20px;
}

.keyword {
    color: #569cd6;
}

.class-name {
    color: #4ec9b0;
}

.property {
    color: #9cdcfe;
}

.string {
    color: #ce9178;
}

.code-text {
    color: #d4d4d4;
}

.typing-animation {
    position: relative;
    margin-top: 20px;
}

.cursor {
    display: inline-block;
    width: 2px;
    height: 20px;
    background: var(--accent-color);
    animation: blink 1s infinite;
}

/* Contact Section */
.contact-section {
    background: var(--gradient);
    color: white;
    text-align: center;
}

.contact-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* Responsive Design - ОНОВЛЕНО з урахуванням відступів зліва та зправа */
@media (max-width: 768px) {
    .hero-section {
        min-height: 60vh;
        padding: 40px 0;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 20px 0;
    }
    
    /* Зменшуємо відступи зліва та зправа на планшетах */
    .greeting {
        padding-left: 2rem;
        padding-right: 2rem;
    }
    
    .hero-visual {
        height: 250px;
    }
    
    .greeting h1 {
        font-size: 2.5rem;
    }
    
    .tech-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-links {
        flex-direction: column;
        align-items: center;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-section {
        min-height: 50vh;
        padding: 30px 0;
    }
    
    .hero-content {
        padding: 15px 0;
    }
    
    /* Мінімальні відступи на дуже маленьких екранах */
    .greeting {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .hero-visual {
        height: 200px;
    }
    
    .greeting h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    section {
        padding: 3rem 0;
    }
}