:root {
    --bg-main: #0a0a0f;
    --bg-secondary: #13131f;
    --text-primary: #f8f8f2;
    --text-secondary: #a0a0b0;
    --accent-color: #6366f1;
    --accent-hover: #4f46e5;
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --gradient-text: linear-gradient(to right, #818cf8, #c084fc);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    width: 100%;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    width: 100%;
    position: relative;
    timeline-scope: --home, --about, --skills, --projects, --contact;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
}

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

.section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 2rem 100px;
    overflow: hidden;
    position: relative;
}

#home { view-timeline-name: --home; view-timeline-axis: block; }
#about { view-timeline-name: --about; view-timeline-axis: block; }
#skills { view-timeline-name: --skills; view-timeline-axis: block; }
#projects { view-timeline-name: --projects; view-timeline-axis: block; }
#contact { view-timeline-name: --contact; view-timeline-axis: block; }

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
}

.section-title span {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 2rem;
    transition: var(--transition);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: 2rem;
    font-weight: 600;
    font-family: var(--font-heading);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
}

.btn-primary:hover {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: var(--glass-bg);
    border-color: rgba(255, 255, 255, 0.2);
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    transition: var(--transition);
    padding: 1rem 0;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
}

.menu-checkbox {
    display: none;
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.5px;
    animation: nav-highlight both;
    animation-timeline: --home;
    animation-range: cover 0% cover 100%;
}

.logo span {
    color: var(--accent-color);
}

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

.nav-links a[href="#about"] {
    animation: nav-highlight both;
    animation-timeline: --about;
    animation-range: cover 0% cover 100%;
}

.nav-links a[href="#skills"] {
    animation: nav-highlight both;
    animation-timeline: --skills;
    animation-range: cover 0% cover 100%;
}

.nav-links a[href="#projects"] {
    animation: nav-highlight both;
    animation-timeline: --projects;
    animation-range: cover 0% cover 100%;
}

.nav-links a[href="#contact"] {
    animation: nav-highlight both;
    animation-timeline: --contact;
    animation-range: cover 0% cover 100%;
}

@keyframes nav-highlight {
    0%, 20%, 80%, 100% {
        color: var(--text-secondary);
        filter: brightness(0.8);
        text-shadow: none;
    }
    30%, 70% {
        color: var(--text-primary);
        filter: brightness(1.5);
        text-shadow: 0 0 15px rgba(99, 102, 241, 0.6);
    }
}

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

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

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
}

.hero {
    position: relative;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    z-index: 10;
    padding: 0 2rem;
}

.greeting {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 500;
}

.hero .title {
    font-size: 4rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.highlight {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.hero-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 10s infinite ease-in-out alternate;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: #6366f1;
    top: -100px;
    right: -100px;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: #a855f7;
    bottom: 100px;
    left: -100px;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.1); }
}

.about {
    background-color: var(--bg-secondary);
    position: relative;
}

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

.about-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.about-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.skills .glass-card {
    padding: 1.5rem;
}

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

.skill-category h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.skill-category h3 i {
    color: var(--accent-color);
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.skill-tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 0.6rem 1.2rem;
    border-radius: 2rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.projects {
    background-color: var(--bg-secondary);
}

.projects .glass-card {
    padding: 2rem;
}

.projects-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.project-card {
    flex: 1;
    max-width: 450px;
    display: flex;
    flex-direction: column;
    height: auto;
}

.project-icon {
    width: 100%;
    height: 250px;
    margin-bottom: 2rem;
    overflow: hidden;
    border-radius: 0.8rem;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
}

.project-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.project-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.project-info p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    flex-grow: 1;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 0.8rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    font-family: var(--font-heading);
    transition: var(--transition);
    margin-top: auto;
    width: fit-content;
}

.project-link:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

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

.contact-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

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

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    border-radius: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    font-family: var(--font-heading);
    transition: var(--transition);
    border: 1px solid var(--glass-border);
}

.contact-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 1.2rem 0;
    border-top: 1px solid var(--glass-border);
    z-index: 2000;
}

.footer-content {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: left;
}

.footer-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--accent-color);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 10, 15, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        display: block;
        max-height: 0;
        opacity: 0;
        visibility: hidden;
        transition: max-height 0.4s ease, opacity 0.3s ease, visibility 0.4s;
        border-bottom: 1px solid var(--glass-border);
        overflow: hidden;
        padding: 1rem 0;
    }

    #menu-toggle-checkbox:checked ~ .nav-links {
        max-height: 300px;
        opacity: 1;
        visibility: visible;
    }

    .nav-links li {
        width: 100%;
        margin: 0;
        padding: 0;
        text-align: center;
    }

    .nav-links a {
        display: block;
        padding: 0.5rem 1rem;
        font-size: 1.1rem;
    }

    .section {
        padding: 80px 1rem;
        justify-content: center;
        min-height: 100vh;
        width: 100%;
        overflow: hidden;
    }

    .container, .nav-container {
        padding: 0 2rem;
        width: 100%;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }

    .hero .title {
        font-size: 2.1rem;
        word-break: break-word;
        max-width: 100%;
    }

    .hero-content {
        margin-top: 20px;
        width: 100%;
    }

    .about-content, .contact-content {
        padding: 1.2rem;
        width: 100%;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
        width: 100%;
    }

    .skills .glass-card {
        padding: 1rem;
    }

    .skill-tag {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .projects-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        gap: 1rem;
        padding: 1rem 0.5rem 2rem;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        margin: 0;
    }

    .projects-grid::-webkit-scrollbar {
        display: none;
    }

    .project-card {
        flex: 0 0 85%;
        scroll-snap-align: center;
    }

    .project-icon {
        height: 160px;
    }

    .contact-content p {
        margin-bottom: 1.5rem;
    }

    .contact-links {
        display: flex;
        flex-direction: column;
        gap: 0.8rem;
        width: 100%;
    }

    .contact-btn {
        width: 100%;
        justify-content: center;
        padding: 0.8rem;
        font-size: 1rem;
    }

    .footer-content {
        justify-content: flex-start;
        padding: 0 2rem;
    }
}
