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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --text: #1e293b;
    --text-light: #64748b;
    --text-lighter: #94a3b8;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
}

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

.section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 60px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    font-family: inherit;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

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

.btn-full {
    width: 100%;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-size: 0.925rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

.nav-links a:hover {
    color: var(--primary);
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: var(--transition);
    border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 60px;
    position: relative;
    background: linear-gradient(180deg, #f0f0ff 0%, var(--bg) 100%);
}

.hero-content {
    max-width: 680px;
}

.hero-avatar {
    margin-bottom: 32px;
}

.avatar-placeholder {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--primary-light);
    box-shadow: 0 0 0 8px rgba(99, 102, 241, 0.1);
}

.avatar-placeholder svg {
    width: 100%;
    height: 100%;
}

.hero-greeting {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 8px;
}

.hero-name {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title {
    font-size: 1.25rem;
    color: var(--text-light);
    font-weight: 400;
    margin-bottom: 16px;
}

.hero-desc {
    font-size: 1.05rem;
    color: var(--text-light);
    margin-bottom: 36px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-scroll-hint {
    position: absolute;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-lighter);
    font-size: 0.8rem;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--text-lighter);
    border-bottom: 2px solid var(--text-lighter);
    transform: rotate(45deg);
    animation: scrollBounce 2s infinite;
}

@keyframes scrollBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: rotate(45deg) translateY(0);
    }
    40% {
        transform: rotate(45deg) translateY(8px);
    }
    60% {
        transform: rotate(45deg) translateY(4px);
    }
}

.about {
    background: var(--bg-alt);
}

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

.about-img-placeholder {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-img-placeholder svg {
    width: 100%;
    height: auto;
    display: block;
}

.about-text h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 16px;
    line-height: 1.8;
}

.about-stats {
    display: flex;
    gap: 40px;
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat span:nth-child(2) {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 4px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.skill-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    transition: var(--transition);
}

.skill-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.skill-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    color: var(--primary);
}

.skill-icon svg {
    width: 100%;
    height: 100%;
}

.skill-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.skill-card p {
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.6;
}

.portfolio {
    background: var(--bg-alt);
}

.portfolio-filter {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    border: 1px solid var(--border);
    border-radius: 100px;
    background: var(--bg);
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.filter-btn:hover {
    border-color: var(--primary-light);
    color: var(--primary);
}

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

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.portfolio-card {
    background: var(--bg);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.portfolio-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.portfolio-card.hidden {
    display: none;
}

.card-image {
    position: relative;
    overflow: hidden;
}

.card-img-placeholder {
    aspect-ratio: 16/10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.portfolio-card:hover .card-overlay {
    opacity: 1;
}

.card-link {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    transition: var(--transition);
    transform: scale(0.8);
}

.portfolio-card:hover .card-link {
    transform: scale(1);
}

.card-link:hover {
    background: var(--primary);
    color: #fff;
}

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

.card-info {
    padding: 20px;
}

.card-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.card-info p {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 12px;
    line-height: 1.5;
}

.card-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.card-tags span {
    padding: 3px 10px;
    background: var(--bg-alt);
    border-radius: 100px;
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 500;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: start;
}

.contact-item {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.contact-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: rgba(99, 102, 241, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary);
}

.contact-icon svg {
    width: 22px;
    height: 22px;
}

.contact-item h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.contact-item p {
    font-size: 0.925rem;
    color: var(--text-light);
}

.contact-social {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

.social-link {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

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

.contact-form {
    background: var(--bg-alt);
    padding: 36px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.form-group {
    position: relative;
    margin-bottom: 24px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text);
    background: var(--bg);
    transition: var(--transition);
    outline: none;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

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

.form-group label {
    position: absolute;
    left: 16px;
    top: 14px;
    color: var(--text-lighter);
    font-size: 0.95rem;
    transition: var(--transition);
    pointer-events: none;
    background: var(--bg);
    padding: 0 4px;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -8px;
    left: 12px;
    font-size: 0.8rem;
    color: var(--primary);
}

.footer {
    padding: 32px 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer p {
    color: var(--text-lighter);
    font-size: 0.875rem;
}

.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-4px);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1024px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg);
        flex-direction: column;
        padding: 80px 32px 32px;
        gap: 24px;
        transition: var(--transition);
        box-shadow: var(--shadow-xl);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-toggle {
        display: flex;
        z-index: 1001;
    }

    .hero-name {
        font-size: 2.5rem;
    }

    .hero-title {
        font-size: 1.1rem;
    }

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

    .about-image {
        max-width: 360px;
        margin: 0 auto;
    }

    .about-stats {
        gap: 24px;
    }

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

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

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

    .section {
        padding: 72px 0;
    }

    .section-title {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .hero-name {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
    }

    .about-stats {
        flex-direction: column;
        gap: 16px;
    }

    .portfolio-filter {
        gap: 8px;
    }

    .filter-btn {
        padding: 6px 14px;
        font-size: 0.8rem;
    }
}