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

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --bg-color: #ffffff;
    --card-bg: #f7fafc;
    --border-color: #e2e8f0;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 40% 20%, rgba(102, 126, 234, 0.05) 0%, transparent 50%);
    animation: moveBackground 20s ease-in-out infinite;
    z-index: -1;
}

@keyframes moveBackground {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(5%, -5%) rotate(120deg);
    }
    66% {
        transform: translate(-5%, 5%) rotate(240deg);
    }
}

.container {
    max-width: 800px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
}

header {
    margin-bottom: 5rem;
}

.profile-photo {
    width: 180px;
    height: 180px;
    margin: 0 auto 3rem;
    transition: transform 0.3s ease;
}

.profile-photo:hover {
    transform: scale(1.05);
}

.profile-photo img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid transparent;
    background: var(--primary-gradient);
    padding: 2px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

h1 {
    font-size: 3.5rem;
    font-weight: 900;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-weight: 300;
    line-height: 1.6;
}

main {
    display: flex;
    flex-direction: column;
}

.about {
    margin-bottom: 4rem;
}

.about p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 1.5rem;
    line-height: 1.8;
}

.about p.lead {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.tech-stack {
    margin-bottom: 3rem;
}

.tech-stack h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

.tech-grid {
    display: flex;
    gap: 0.75rem;
    overflow: hidden;
    padding: 1rem 0;
    margin: 0 auto;
    max-width: 100%;
    position: relative;
}

.tech-grid::before,
.tech-grid::after {
    content: '';
    position: absolute;
    top: 0;
    width: 100px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.tech-grid::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-color), transparent);
}

.tech-grid::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-color), transparent);
}

.tech-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    white-space: nowrap;
    animation: scrollCarousel 35s linear infinite;
    animation-delay: 5s;
}

@keyframes scrollCarousel {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-100% - 0.75rem));
    }
}

.tech-grid:hover .tech-tag {
    animation-play-state: paused;
}

.tech-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s ease;
}

.tech-tag:hover::before {
    left: 100%;
}

.tech-tag svg {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.tech-tag:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 24px rgba(102, 126, 234, 0.25);
}

.tech-tag:hover svg {
    transform: rotate(5deg) scale(1.1);
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.social-link:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.15);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

footer {
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    width: 100%;
    display: flex;
    justify-content: center;
}

footer p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.125rem;
    }

    .profile-photo {
        width: 140px;
        height: 140px;
    }

    .about p.lead {
        font-size: 1.25rem;
    }

    .about p {
        font-size: 1rem;
    }

    .social-links {
        flex-direction: column;
        align-items: stretch;
    }

    .social-link {
        justify-content: center;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f7fafc;
        --text-secondary: #cbd5e0;
        --bg-color: #1a202c;
        --card-bg: #2d3748;
        --border-color: #4a5568;
    }
}
