:root {
    --primary: #6C63FF;
    --secondary: #4D44DB;
    --dark: #050505;
    --light: #F5F5F5;
    --white: #FFFFFF;
    --gray: #666666;
    --light-gray: #E5E5E5;
    --accent-light: rgba(108, 99, 255, 0.1);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--dark);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 120px 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

.cursor, .cursor-follower {
    position: fixed;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    mix-blend-mode: difference;
    z-index: 9999;
    transition: transform 0.1s;
}

.cursor {
    width: 8px;
    height: 8px;
    background: var(--white);
}

.cursor.active {
    transform: translate(-50%, -50%) scale(3);
    background: var(--accent-light);
}

.cursor-follower {
    width: 30px;
    height: 30px;
    border: 1px solid var(--primary);
    transition: all 0.3s ease;
}

.cursor-follower.active {
    width: 60px;
    height: 60px;
    background: var(--primary);
    opacity: 0.3;
}

.cursor-text {
    position: fixed;
    font-size: 14px;
    font-weight: 500;
    color: var(--white);
    text-transform: uppercase;
    pointer-events: none;
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
    transform: translate(30px, 30px);
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 30px 0;
    z-index: 1000;
    transition: var(--transition);
}

nav.scrolled {
    padding: 20px 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.05);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    font-size: 24px;
    position: relative;
    transition: var(--transition);
}

.logo:hover {
    color: var(--primary);
}

#nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 30px;
}

#nav-menu li a {
    font-size: 15px;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

#nav-menu li a:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

#nav-menu li a:hover:after {
    width: 100%;
}

.btn-nav {
    padding: 10px 20px;
    border-radius: 50px;
    background: var(--primary);
    color: var(--white);
    font-size: 14px;
    transition: var(--transition);
}

.btn-nav:hover {
    background: var(--secondary);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 16px;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--dark);
    transition: var(--transition);
}

.menu-toggle.active span:first-child {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:last-child {
    transform: rotate(-45deg) translate(5px, -5px);
}

.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
}

.hero .container {
    display: flex;
    align-items: center;
    gap: 80px;
}

.hero-content {
    flex: 1;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero-title .line {
    display: block;
    overflow: hidden;
    margin-bottom: 10px;
}

.hero-subtitle {
    font-size: 18px;
    margin-bottom: 40px;
    color: var(--gray);
}

.hero-buttons {
    display: flex;
    gap: 20px;
    margin-top: 40px;
}

.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: 50px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--secondary);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(108, 99, 255, 0.2);
}

.btn-secondary {
    background: transparent;
    color: var(--dark);
    border: 1px solid var(--light-gray);
}

.btn-secondary:hover {
    border-color: var(--dark);
    transform: translateY(-3px);
}

.hero-image {
    flex: 0 0 auto;
    position: relative;
}

.image-frame {
    width: 400px;
    height: 400px;
    border-radius: 30% 70% 70% 30% / 0% 30% 70% 70%;
    overflow: hidden;
    animation: morph 8s ease-in-out infinite;
    border: 5px solid var(--primary);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
}

@keyframes morph {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    50% { border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%; }
    100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
}

.image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.hero-image:hover .image-frame img {
    transform: scale(1.05);
}

.section-header {
    margin-bottom: 60px;
}

.section-subtitle {
    display: block;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary);
    margin-bottom: 15px;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.1;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 80px;
    align-items: center;
}

.about-image {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.about-image:hover {
    transform: translateY(-10px);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-text p {
    font-size: 18px;
    margin-bottom: 20px;
    line-height: 1.7;
    color: var(--gray);
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 40px;
}

.skill {
    padding: 10px 20px;
    border-radius: 50px;
    background: var(--light);
    color: var(--primary);
    font-size: 14px;
    font-weight: 500;
    border: 1px solid var(--light-gray);
    transition: var(--transition);
}

.skill:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-3px);
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.work-card {
    border-radius: 20px;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--light-gray);
    transition: var(--transition);
}

.work-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.work-image {
    height: 250px;
    overflow: hidden;
}

.work-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.work-card:hover .work-image img {
    transform: scale(1.1);
}

.work-info {
    padding: 30px;
}

.work-info h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.work-info p {
    color: var(--gray);
    margin-bottom: 20px;
}

.work-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
    transition: var(--transition);
}

.work-card:hover .work-link {
    color: var(--primary);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 80px;
}

.contact-methods {
    margin-bottom: 40px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    border-radius: 10px;
    transition: var(--transition);
    margin-bottom: 15px;
}

.contact-item:hover {
    background: var(--light);
}

.contact-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.contact-details span {
    display: block;
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 18px;
}

.social-links a:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-5px);
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid var(--light-gray);
    border-radius: 10px;
    font-family: 'Space Grotesk', sans-serif;
    transition: var(--transition);
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--accent-light);
}

footer {
    padding: 60px 0;
    border-top: 1px solid var(--light-gray);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left p {
    margin-top: 10px;
    color: var(--gray);
}

.back-to-top {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    transition: var(--transition);
}

.back-to-top:hover {
    color: var(--primary);
}

@media (max-width: 1024px) {
    .hero .container {
        flex-direction: column;
        gap: 50px;
    }

    .hero-content {
        text-align: center;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-image {
        width: 80%;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    section {
        padding: 80px 0;
    }

    .menu-toggle {
        display: flex;
    }

    #nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        padding: 40px;
        transition: var(--transition);
        box-shadow: 10px 0 50px rgba(0, 0, 0, 0.1);
    }

    #nav-menu.active {
        left: 0;
    }

    #nav-menu li {
        margin: 15px 0;
    }

    .btn-nav {
        margin-top: 20px;
    }

    .hero {
        padding-top: 120px;
        height: auto;
        min-height: 100vh;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .footer-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .work-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .image-frame {
        width: 280px;
        height: 280px;
    }
}
.theme-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
}

#theme-switch {
    display: none;
}

#theme-switch + label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

#theme-switch + label:hover {
    transform: scale(1.1);
}

#theme-switch + label .moon {
    display: none;
}

[data-theme="dark"] {
    --dark: #F5F5F5;
    --light: #121212;
    --white: #050505;
    --gray: #AAAAAA;
    --light-gray: #333333;
    --primary: #7D73FF;
    --secondary: #5D54DB;
}

[data-theme="dark"] body {
    background: #121212;
    color: #F5F5F5;
}

[data-theme="dark"] nav.scrolled {
    background: rgba(25,25,25,0.95);
}

[data-theme="dark"] .btn-secondary {
    border-color: #444;
}

[data-theme="dark"] .work-card {
    background: #1E1E1E;
    border-color: #333;
}

[data-theme="dark"] #theme-switch + label .sun {
    display: none;
}

[data-theme="dark"] #theme-switch + label .moon {
    display: block;
}

