/* ===== VARIABLES ===== */
:root {
    --primary-color: #6c63ff;
    --secondary-color: #f50057;
    --accent-color: #00e5ff;
    --background-color: #0a1929;
    --card-background: #102a43;
    --text-color: #f5f5f5;
    --text-secondary: #b0bec5;
    --header-bg: rgba(10, 25, 41, 0.9);
    --dark-overlay: rgba(0, 0, 0, 0.7);
    --transition: all 0.3s ease;
    --box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    --border-radius: 8px;
}

/* ===== BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.3;
}

/* ===== LOADER ===== */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.3s ease;
}

.loader-inner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--primary-color);
    border-top: 5px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    z-index: 100;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.navbar.scrolled {
    height: 70px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

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

.nav-links li {
    margin: 0 15px;
}

.nav-item {
    position: relative;
    font-weight: 500;
    padding: 8px 0;
    transition: var(--transition);
}

.nav-item::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    transition: var(--transition);
}

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

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

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 30px;
    height: 3px;
    background-color: var(--text-color);
    margin: 3px 0;
    transition: var(--transition);
}

/* ===== HEADER ===== */
header {
    background: linear-gradient(to right, rgba(10, 25, 41, 0.9), rgba(10, 25, 41, 0.7)), url('hero-bg.jpg') no-repeat center center/cover;
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 100px 0;
}

.text-content {
    flex: 1;
    max-width: 600px;
}

.profile-container {
    position: relative;
    margin-left: 50px;
}

.profile-photo {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    position: relative;
    z-index: 2;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.profile-bg {
    position: absolute;
    width: 270px;
    height: 270px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    top: -10px;
    left: -10px;
    z-index: 1;
    animation: rotate 10s linear infinite;
    opacity: 0.8;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/*  */
.glitch {                             
    font-size: 3.5rem;
    position: relative;
    color: var(--text-color);
    margin-bottom: 15px;
}

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

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 var(--secondary-color);
    animation: glitch-1 2s infinite linear alternate-reverse;
    z-index: -1;
}

.glitch::after {
    left: -2px;
    text-shadow: 1px 0 var(--accent-color);
    animation: glitch-2 3s infinite linear alternate-reverse;
    z-index: -2;
}

@keyframes glitch-1 {
    0% { clip-path: inset(80% 0 0 0); }
    20% { clip-path: inset(20% 0 60% 0); }
    40% { clip-path: inset(40% 0 40% 0); }
    60% { clip-path: inset(60% 0 20% 0); }
    80% { clip-path: inset(0 0 80% 0); }
    100% { clip-path: inset(100% 0 0 0); }
}

@keyframes glitch-2 {
    0% { clip-path: inset(0 0 0 100%); }
    20% { clip-path: inset(0 0 0 60%); }
    40% { clip-path: inset(0 0 0 40%); }
    60% { clip-path: inset(0 0 0 20%); }
    80% { clip-path: inset(0 0 0 80%); }
    100% { clip-path: inset(0 0 0 0%); }
}

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

.cta-buttons {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.primary-btn {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(255, 152, 0, 0.5);
}

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

.secondary-btn:hover {
    background: rgba(255, 152, 0, 0.1);
    transform: translateY(-3px);
}

.small-btn {
    padding: 8px 15px;
    font-size: 0.9rem;
}

/* ===== SECTION STYLES ===== */
section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

/* ===== ABOUT SECTION ===== */
.about-content {
    display: flex;
    gap: 50px;
    align-items: center;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.about-stats {
    display: flex;
    gap: 40px;
    margin-top: 40px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

/* ===== SKILLS SECTION ===== */
.skills-content {
    display: flex;
    gap: 40px;
}

.skill-category {
    flex: 1;
}

.skill-category h3 {
    margin-bottom: 30px;
    font-size: 1.5rem;
    color: var(--text-secondary);
}

.skill-bars {
    padding: 20px;
    background: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.skill-bar {
    margin-bottom: 30px;
}

.skill-bar:last-child {
    margin-bottom: 0;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 500;
}

.progress-line {
    height: 8px;
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.progress-line span {
    position: absolute;
    height: 100%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    width: 0;
    transition: width 1.5s ease;
}

.skill-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.skill-card {
    padding: 20px;
    background: var(--card-background);
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.skill-card i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* ===== PROJECTS SECTION ===== */
.project {
    background: var(--card-background);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    text-align: left;
    margin-bottom: 30px;
}

.project:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.project h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.project p {
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    padding: 20px;
}

.project-tags span {
    background: rgba(255, 152, 0, 0.2);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--primary-color);
    
}

.project-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

/* ===== CONTACT SECTION ===== */
.contact-content {
    display: flex;
    gap: 50px;
    flex-wrap: wrap;
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    border-radius: var(--border-radius);
    background: var(--card-background);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    margin-bottom: 20px;
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

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


.contact-form {
    flex: 1;
    padding: 30px;
    background: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    min-width: 300px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 12px 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    outline: none;
    transition: var(--transition);
}

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

.form-group input:focus, 
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(255, 152, 0, 0.2);
}

/* ===== FOOTER ===== */
footer {
    background: var(--card-background);
    padding: 40px 0;
    margin-top: 50px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

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

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-5px);
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== SCROLL TO TOP ===== */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 99;
}

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

/* ===== RESPONSIVE DESIGN ===== */
@media screen and (max-width: 1024px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 50px;
    }
    
    .text-content {
        max-width: 100%;
    }
    
    .profile-container {
        margin-left: 0;
    }
    
    .cta-buttons {
        justify-content: center;
    }
    
    .about-content, 
    .skills-content,
    .contact-content {
        flex-direction: column;
    }
    
    .about-stats {
        justify-content: center;
    }
    
    .skill-cards {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .project-card {
        flex-direction: column;
    }
    
    .project-img {
        min-width: 100%;
        height: 300px;
    }
}

@media screen and (max-width: 768px) {
    .navbar {
        height: 70px;
    }
    
    .nav-container {
        position: relative;
    }
    
    .nav-links {
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        flex-direction: column;
        align-items: center;
        background: var(--header-bg);
        padding: 20px 0;
        transform: translateY(-100%);
        opacity: 0;
        transition: var(--transition);
        z-index: -1;
    }
    
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        z-index: 99;
    }
    
    .nav-links li {
        margin: 15px 0;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .menu-toggle.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    .glitch {
        font-size: 2.5rem;
    }
    
    .profile-photo {
        width: 200px;
        height: 200px;
    }
    
    .profile-bg {
        width: 220px;
        height: 220px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .skill-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 576px) {
    .glitch {
        font-size: 2rem;
    }
    
    .about-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .skill-cards {
        grid-template-columns: 1fr;
    }
    
    .project-tags {
        justify-content: center;
    }
    
    .project-links {
        flex-direction: column;
        align-items: center;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
    }
    
    .scroll-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}