/* Global Styles */
:root {
    --primary-color: #2563eb;
    --secondary-color: #3b82f6;
    --accent-color: #60a5fa;
    --background-dark: #0f172a;
    --background-light: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --success-color: #22c55e;
    --border-color: #334155;
}

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

html {
    scroll-behavior: smooth;
  }

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-dark);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 1rem 2rem;
    background-color: rgba(15, 23, 42, 0.95);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

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

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

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

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

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

.nav-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 2rem;
    position: relative;
    background: linear-gradient(to bottom right, var(--background-dark), var(--background-light));
}

.hero-content {
    max-width: 1200px;
    width: 100%;
    text-align: center;
}

.hero-greeting {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.hero-name {
    font-size: 4rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-title {
    font-size: 2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-primary);
}

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

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

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

.hero-social {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.social-link {
    color: var(--text-secondary);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-link:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Section Styles */
section {
    padding: 6rem 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-line {
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    margin: 0 auto;
    border-radius: 2px;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.about-image {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.about-image:hover img {
    transform: scale(1.05);
}

.about-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom right, rgba(37, 99, 235, 0.2), rgba(96, 165, 250, 0.2));
}

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

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
}

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

.stat-label {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Skills Section */
.skills {
    padding: 100px 0;
    background: var(--bg-color);
}

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

.skill-category {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
}

.skill-category h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    text-align: center;
}

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

.skill-item {
    text-align: center;
    padding: 1rem;
    background: rgba(var(--primary-rgb), 0.05);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.skill-item:hover {
    background: rgba(var(--primary-rgb), 0.1);
    transform: translateY(-3px);
}

.skill-icon {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.skill-item h4 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.skill-level {
    height: 6px;
    background: rgba(var(--primary-rgb), 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 3px;
    transition: width 1s ease-in-out;
}

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

.project-card {
    background-color: var(--background-light);
    border-radius: 1rem;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.project-links {
    display: flex;
    gap: 1rem;
}

.project-links a {
    color: var(--text-primary);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.project-links a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.project-content {
    padding: 2rem;
}

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

.project-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tech span {
    background-color: var(--background-dark);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.contact-details {
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.contact-item i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.contact-form {
    background-color: var(--background-light);
    padding: 2rem;
    border-radius: 1rem;
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background-color: var(--background-dark);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group textarea {
    height: 150px;
    resize: none;
}

.form-group label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    pointer-events: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -0.5rem;
    left: 0.5rem;
    font-size: 0.9rem;
    background-color: var(--background-light);
    padding: 0 0.5rem;
    color: var(--primary-color);
}

/* Footer */
.footer {
    background-color: var(--background-light);
    padding: 2rem;
    text-align: center;
}

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

.footer p {
    color: var(--text-secondary);
}

.footer-social {
    display: flex;
    gap: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

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

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }

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

    .footer-content {
        flex-direction: column;
        gap: 1rem;
    }

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

    .skills-list {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 1s ease forwards;
}

/* Smoke Animation */
.smoke-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.smoke {
    position: absolute;
    bottom: -100px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    animation: smokeRise 8s infinite;
    opacity: 0;
}

.smoke:nth-child(1) { left: 10%; animation-delay: 0s; }
.smoke:nth-child(2) { left: 30%; animation-delay: 2s; }
.smoke:nth-child(3) { left: 50%; animation-delay: 4s; }
.smoke:nth-child(4) { left: 70%; animation-delay: 6s; }
.smoke:nth-child(5) { left: 90%; animation-delay: 8s; }

@keyframes smokeRise {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0;
    }
    20% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(-100vh) scale(3);
        opacity: 0;
    }
}

/* Glitch Effect */
.glitch {
    position: relative;
    animation: glitch 1s linear infinite;
}

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

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 #00fff9, 2px 2px #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch {
    2%, 64% {
        transform: translate(2px, 0) skew(0deg);
    }
    4%, 60% {
        transform: translate(-2px, 0) skew(0deg);
    }
    62% {
        transform: translate(0, 0) skew(5deg);
    }
}

@keyframes glitch-anim {
    0% {
        clip: rect(31px, 9999px, 94px, 0);
    }
    4.166666667% {
        clip: rect(70px, 9999px, 71px, 0);
    }
    8.333333333% {
        clip: rect(75px, 9999px, 77px, 0);
    }
    12.5% {
        clip: rect(14px, 9999px, 82px, 0);
    }
    16.666666667% {
        clip: rect(23px, 9999px, 30px, 0);
}
    20.833333333% {
        clip: rect(66px, 9999px, 73px, 0);
    }
    25% {
        clip: rect(14px, 9999px, 15px, 0);
    }
    29.166666667% {
        clip: rect(26px, 9999px, 83px, 0);
    }
    33.333333333% {
        clip: rect(55px, 9999px, 73px, 0);
    }
    37.5% {
        clip: rect(7px, 9999px, 29px, 0);
    }
    41.666666667% {
        clip: rect(83px, 9999px, 30px, 0);
    }
    45.833333333% {
        clip: rect(73px, 9999px, 51px, 0);
    }
    50% {
        clip: rect(7px, 9999px, 82px, 0);
}
    54.166666667% {
        clip: rect(25px, 9999px, 61px, 0);
    }
    58.333333333% {
        clip: rect(54px, 9999px, 27px, 0);
    }
    62.5% {
        clip: rect(12px, 9999px, 16px, 0);
    }
    66.666666667% {
        clip: rect(25px, 9999px, 66px, 0);
    }
    70.833333333% {
        clip: rect(33px, 9999px, 27px, 0);
    }
    75% {
        clip: rect(55px, 9999px, 84px, 0);
}
    79.166666667% {
        clip: rect(25px, 9999px, 92px, 0);
    }
    83.333333333% {
        clip: rect(54px, 9999px, 27px, 0);
    }
    87.5% {
        clip: rect(45px, 9999px, 69px, 0);
    }
    91.666666667% {
        clip: rect(51px, 9999px, 27px, 0);
    }
    95.833333333% {
        clip: rect(37px, 9999px, 20px, 0);
    }
    100% {
        clip: rect(69px, 9999px, 84px, 0);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(65px, 9999px, 100px, 0);
    }
    5.882352941% {
        clip: rect(52px, 9999px, 74px, 0);
    }
    11.764705882% {
        clip: rect(79px, 9999px, 85px, 0);
    }
    17.647058824% {
        clip: rect(75px, 9999px, 5px, 0);
}
    23.529411765% {
        clip: rect(67px, 9999px, 61px, 0);
    }
    29.411764706% {
        clip: rect(14px, 9999px, 79px, 0);
    }
    35.294117647% {
        clip: rect(1px, 9999px, 66px, 0);
    }
    41.176470588% {
        clip: rect(86px, 9999px, 30px, 0);
    }
    47.058823529% {
        clip: rect(23px, 9999px, 98px, 0);
    }
    52.941176471% {
        clip: rect(52px, 9999px, 27px, 0);
    }
    58.823529412% {
        clip: rect(22px, 9999px, 73px, 0);
    }
    64.705882353% {
        clip: rect(89px, 9999px, 50px, 0);
    }
    70.588235294% {
        clip: rect(19px, 9999px, 25px, 0);
    }
    76.470588235% {
        clip: rect(40px, 9999px, 62px, 0);
    }
    82.352941176% {
        clip: rect(95px, 9999px, 30px, 0);
    }
    88.235294118% {
        clip: rect(31px, 9999px, 69px, 0);
    }
    94.117647059% {
        clip: rect(67px, 9999px, 85px, 0);
}
    100% {
        clip: rect(44px, 9999px, 11px, 0);
    }
}

/* Counter Animation */
.counter {
    display: inline-block;
    position: relative;
}

.counter-value {
    display: inline-block;
    transition: all 0.3s ease;
}

/* Floating Elements Animation */
.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.floating-element {
    position: absolute;
    background: var(--accent-color);
    border-radius: 50%;
    opacity: 0.1;
    filter: blur(2px);
    transition: transform 0.1s ease-out;
}

.floating-element:nth-child(1) {
    width: 100px;
    height: 100px;
    top: 20%;
    left: 10%;
    background: linear-gradient(45deg, var(--accent-color), var(--primary-color));
}

.floating-element:nth-child(2) {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 15%;
    background: linear-gradient(45deg, var(--secondary-color), var(--accent-color));
}

.floating-element:nth-child(3) {
    width: 80px;
    height: 80px;
    bottom: 20%;
    left: 20%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
}

.floating-element:nth-child(4) {
    width: 120px;
    height: 120px;
    top: 30%;
    right: 25%;
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
}

/* Parallax Sections */
.parallax-section {
    position: relative;
    overflow: hidden;
}

.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(var(--primary-rgb), 0.05), rgba(var(--secondary-rgb), 0.05));
    transform: translateZ(-1px) scale(2);
    z-index: -1;
}

/* Scroll Progress Indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    transform-origin: 0 50%;
    transform: scaleX(0);
    z-index: 1000;
}

/* Update existing sections to include parallax effect */
.hero, .about, .skills, .projects, .contact {
    position: relative;
    z-index: 2;
}

/* Scroll Glitch Animation */
.scroll-glitch {
    position: relative;
    transition: all 0.3s ease;
}

.scroll-glitch::before,
.scroll-glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: all 0.3s ease;
}

.scroll-glitch::before {
    color: var(--accent-color);
    transform: translate(2px, 0);
    animation: glitch-anim-1 0.3s infinite;
}

.scroll-glitch::after {
    color: var(--primary-color);
    transform: translate(-2px, 0);
    animation: glitch-anim-2 0.3s infinite;
}

.scroll-glitch.active::before,
.scroll-glitch.active::after {
    opacity: 0.1;
}

@keyframes glitch-anim-1 {
    0% {
        clip-path: inset(20% 0 30% 0);
    }
    20% {
        clip-path: inset(60% 0 10% 0);
    }
    40% {
        clip-path: inset(40% 0 50% 0);
    }
    60% {
        clip-path: inset(80% 0 5% 0);
    }
    80% {
        clip-path: inset(10% 0 70% 0);
    }
    100% {
        clip-path: inset(30% 0 20% 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip-path: inset(30% 0 20% 0);
    }
    20% {
        clip-path: inset(10% 0 70% 0);
    }
    40% {
        clip-path: inset(80% 0 5% 0);
    }
    60% {
        clip-path: inset(40% 0 50% 0);
    }
    80% {
        clip-path: inset(60% 0 10% 0);
    }
    100% {
        clip-path: inset(20% 0 30% 0);
    }
}

/* Image Glitch Effect */
.image-glitch {
    position: relative;
    overflow: hidden;
}

.image-glitch img {
    transition: all 0.3s ease;
}

.image-glitch.active img {
    animation: image-glitch 0.3s infinite;
}

@keyframes image-glitch {
    0% {
        transform: translate(0);
        filter: hue-rotate(0deg);
    }
    20% {
        transform: translate(-2px, 2px);
        filter: hue-rotate(90deg);
    }
    40% {
        transform: translate(-2px, -2px);
        filter: hue-rotate(180deg);
    }
    60% {
        transform: translate(2px, 2px);
        filter: hue-rotate(270deg);
    }
    80% {
        transform: translate(2px, -2px);
        filter: hue-rotate(360deg);
    }
    100% {
        transform: translate(0);
        filter: hue-rotate(0deg);
    }
}

/* Card Glitch Effect */
.card-glitch {
    position: relative;
    transition: all 0.3s ease;
}

.card-glitch.active {
    animation: card-glitch 0.3s infinite;
}

@keyframes card-glitch {
    0% {
        transform: translate(0);
        box-shadow: 0 0 0 rgba(var(--primary-rgb), 0.1);
    }
    20% {
        transform: translate(-2px, 2px);
        box-shadow: 2px -2px 0 rgba(var(--accent-rgb), 0.2);
    }
    40% {
        transform: translate(-2px, -2px);
        box-shadow: -2px 2px 0 rgba(var(--secondary-rgb), 0.2);
    }
    60% {
        transform: translate(2px, 2px);
        box-shadow: 2px 2px 0 rgba(var(--accent-rgb), 0.2);
    }
    80% {
        transform: translate(2px, -2px);
        box-shadow: -2px -2px 0 rgba(var(--secondary-rgb), 0.2);
    }
    100% {
        transform: translate(0);
        box-shadow: 0 0 0 rgba(var(--primary-rgb), 0.1);
    }
}