/* ===== Global Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --accent: #ec4899;
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --text-light: #f1f5f9;
    --text-gray: #94a3b8;
    --card-bg: #1e293b;
    --border: #334155;
}

html {
    scroll-behavior: smooth;
}

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

/* ===== Header Navigation ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: transform 0.3s ease;
}

.header.hide {
    transform: translateY(-100%);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: 'Fira Code', monospace;
}

.logo-bracket {
    color: var(--primary);
}

.logo-text {
    color: var(--text-light);
    margin: 0 0.3rem;
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-link {
    color: var(--text-gray);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-light);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* ===== Hero Section ===== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 6rem 2rem 2rem;
    overflow: hidden;
}

.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.5;
    animation: float 10s infinite ease-in-out;
}

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

.hero-content {
    max-width: 1400px;
    width: 100%;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
    z-index: 1;
}

.hero-text h1 {
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease;
}

.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch:hover::before {
    animation: glitch-1 0.3s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    transform: translate(-2px, -2px);
}

.glitch:hover::after {
    animation: glitch-2 0.3s infinite;
    clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%);
    transform: translate(2px, 2px);
}

@keyframes glitch-1 {
    0% { clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%); }
    50% { clip-path: polygon(0 10%, 100% 10%, 100% 55%, 0 55%); }
    100% { clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%); }
}

@keyframes glitch-2 {
    0% { clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%); }
    50% { clip-path: polygon(0 50%, 100% 50%, 100% 90%, 0 90%); }
    100% { clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%); }
}

.typing-container {
    font-size: 1.8rem;
    color: var(--text-gray);
    margin-bottom: 1.5rem;
    font-family: 'Fira Code', monospace;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.cursor {
    animation: blink 1s infinite;
}

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

.hero-description {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn span,
.btn i {
    position: relative;
    z-index: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: 2px solid transparent;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

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

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.hero-image {
    animation: fadeInRight 0.8s ease 0.4s both;
}

.image-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.image-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--card-bg), var(--bg-dark));
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    position: relative;
    z-index: 1;
    border: 2px solid var(--border);
    transition: all 0.3s ease;
}

.image-placeholder i {
    font-size: 4rem;
    color: var(--text-gray);
}

.image-placeholder p {
    color: var(--text-gray);
    font-size: 1.1rem;
}

.image-placeholder:hover {
    transform: scale(1.05);
    border-color: var(--primary);
}

.image-border {
    position: absolute;
    top: 20px;
    left: 20px;
    right: -20px;
    bottom: -20px;
    border: 2px solid var(--primary);
    border-radius: 20px;
    z-index: 0;
    animation: borderPulse 3s infinite;
}

@keyframes borderPulse {
    0%, 100% { transform: translate(0, 0); opacity: 0.5; }
    50% { transform: translate(-10px, -10px); opacity: 1; }
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-gray);
    font-size: 0.9rem;
    animation: fadeIn 1s ease 1s both;
}

.mouse {
    width: 24px;
    height: 40px;
    border: 2px solid var(--text-gray);
    border-radius: 12px;
    position: relative;
    animation: mouseScroll 2s infinite;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--primary);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: wheelMove 2s infinite;
}

@keyframes mouseScroll {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes wheelMove {
    0% { transform: translate(-50%, 0); opacity: 1; }
    100% { transform: translate(-50%, 12px); opacity: 0; }
}

/* ===== Section Styles ===== */
section {
    min-height: 100vh;
    padding: 6rem 2rem;
}

.section-container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 4rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.title-number {
    color: var(--primary);
    font-family: 'Fira Code', monospace;
    font-size: 1.8rem;
}

.title-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border), transparent);
}

/* ===== About Section ===== */
.about-content {
    display: grid;
    gap: 3rem;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-gray);
    margin-bottom: 1.5rem;
}

.about-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.highlight-item {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    cursor: pointer;
}

.highlight-item i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.highlight-item h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.highlight-item p {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin: 0;
}

.highlight-item:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

.highlight-item:hover i {
    transform: scale(1.2) rotate(360deg);
}

/* ===== Skills Section ===== */
.skills-section {
    background: var(--bg-dark);
}

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

.skill-category {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

.category-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.category-header i {
    font-size: 1.8rem;
    color: var(--primary);
    transition: transform 0.3s ease;
}

.skill-category:hover .category-header i {
    transform: scale(1.2) rotate(360deg);
}

.category-header h3 {
    font-size: 1.2rem;
    color: var(--text-light);
}

.category-content {
    padding: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    min-height: 120px;
    align-content: flex-start;
}

.skill-tag {
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--primary);
    border-radius: 6px;
    color: var(--text-light);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: default;
}

.skill-tag:hover {
    background: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

/* ===== Projects Section ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.3);
}

.project-image {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, var(--bg-dark), var(--card-bg));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-placeholder {
    font-size: 4rem;
    color: var(--text-gray);
    transition: all 0.3s ease;
}

.project-card:hover .project-placeholder {
    transform: scale(1.2);
    color: var(--primary);
}

.project-info {
    padding: 2rem;
}

.project-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.project-info p {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.project-tags span {
    padding: 0.4rem 0.9rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--primary);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--primary);
}

/* ===== Contact Section ===== */
.contact-section {
    background: var(--bg-dark);
}

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

.contact-description {
    font-size: 1.2rem;
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 3rem;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.contact-method {
    padding: 2rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.contact-method i {
    font-size: 2.5rem;
    color: var(--primary);
    transition: all 0.3s ease;
}

.contact-method:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.contact-method:hover i {
    transform: scale(1.2) rotate(360deg);
}

/* ===== Footer ===== */
.footer {
    padding: 2rem;
    text-align: center;
    color: var(--text-gray);
    border-top: 1px solid var(--border);
    background: var(--bg-darker);
}

.footer p {
    margin: 0.5rem 0;
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== AOS Animation Classes ===== */
[data-aos] {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos].aos-animate {
    opacity: 1;
}

[data-aos="fade-up"] {
    transform: translateY(50px);
}

[data-aos="fade-up"].aos-animate {
    transform: translateY(0);
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 3.5rem;
    }

    .image-container {
        max-width: 300px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background: var(--bg-dark);
        width: 100%;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--border);
        transition: left 0.3s ease;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .typing-container {
        font-size: 1.3rem;
    }

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

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

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}
