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

:root {
    --primary: #4F46E5;
    --primary-light: #818CF8;
    --primary-lighter: #C7D2FE;
    --secondary: #06B6D4;
    --accent: #8B5CF6;
    --dark: #1E293B;
    --light: #FFFFFF;
    --gray: #64748B;
    --gray-light: #94A3B8;
    --gray-lighter: #CBD5E1;
    --bg-light: #F8FAFC;
    --bg-white: #FFFFFF;
    --gradient: linear-gradient(135deg, #4F46E5, #06B6D4);
    --gradient-soft: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(6, 182, 212, 0.1));
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-light);
    color: var(--dark);
    line-height: 1.6;
    cursor: none;
}

/* Loader */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 50%, #FFFFFF 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-wrapper.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.loader-initials {
    position: relative;
    font-size: 120px;
    font-weight: 900;
    display: flex;
    gap: 10px;
    z-index: 2;
}

.letter-k,
.letter-c {
    background: linear-gradient(135deg, #4F46E5, #06B6D4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: letterGlow 2s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(79, 70, 229, 0.3));
}

.letter-k {
    animation-delay: 0s;
}

.letter-c {
    animation-delay: 0.2s;
}

@keyframes letterGlow {
    0%, 100% {
        filter: brightness(1) drop-shadow(0 0 15px rgba(79, 70, 229, 0.4));
        transform: scale(1);
    }
    50% {
        filter: brightness(1.2) drop-shadow(0 0 25px rgba(6, 182, 212, 0.5));
        transform: scale(1.03);
    }
}

.loader-ring,
.loader-ring-2,
.loader-ring-3 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 3px solid transparent;
}

.loader-ring {
    width: 200px;
    height: 200px;
    border-top-color: #4F46E5;
    border-right-color: #4F46E5;
    animation: spinLoader 1.5s linear infinite;
}

.loader-ring-2 {
    width: 240px;
    height: 240px;
    border-bottom-color: #06B6D4;
    border-left-color: #06B6D4;
    animation: spinLoader 2s linear infinite reverse;
}

.loader-ring-3 {
    width: 280px;
    height: 280px;
    border-top-color: #8B5CF6;
    border-right-color: #8B5CF6;
    animation: spinLoader 2.5s linear infinite;
    opacity: 0.5;
}

@keyframes spinLoader {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.loading-text {
    font-size: 20px;
    color: var(--gray);
    letter-spacing: 3px;
    font-weight: 600;
    text-transform: uppercase;
}

.dots::after {
    content: '';
    animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {
    0%, 20% {
        content: '';
    }
    40% {
        content: '.';
    }
    60% {
        content: '..';
    }
    80%, 100% {
        content: '...';
    }
}

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    pointer-events: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 10000;
    transition: all 0.1s ease;
}

.cursor-dot {
    width: 6px;
    height: 6px;
    background: var(--primary);
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.5);
}

.cursor-outline {
    width: 35px;
    height: 35px;
    border: 2px solid var(--primary);
    opacity: 0.3;
}

/* Particles Background */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    opacity: 0.4;
}

/* Main Container */
.cv-container {
    max-width: 1400px;
    margin: 0 auto;
    background: var(--bg-white);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 10px 30px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.cv-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--gradient);
    box-shadow: 0 2px 10px rgba(79, 70, 229, 0.2);
}

/* Header */
.cv-header {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.03), rgba(6, 182, 212, 0.03));
    padding: 80px 60px 40px;
    position: sticky;
    top: 0;
    z-index: 100;
    overflow: hidden;
    border-bottom: 1px solid rgba(203, 213, 225, 0.5);
}

.cv-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.05), transparent);
    animation: rotateGlow 20s linear infinite;
}

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

.header-content {
    display: flex;
    align-items: center;
    gap: 60px;
    position: relative;
    z-index: 1;
}

/* Profile Image */
.profile-image-wrapper {
    position: relative;
    flex-shrink: 0;
}

.profile-image {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.2), 0 5px 15px rgba(6, 182, 212, 0.15);
}

.profile-initial {
    font-size: 4em;
    font-weight: 900;
    color: white;
}

.profile-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 3px solid;
    border-color: var(--primary) transparent transparent transparent;
    border-radius: 50%;
    animation: spin 3s linear infinite;
}

.profile-ring:nth-child(2) {
    width: 200px;
    height: 200px;
}

.profile-ring:nth-child(3) {
    width: 220px;
    height: 220px;
    animation-duration: 4s;
    animation-direction: reverse;
}

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

/* Header Text */
.header-text {
    flex: 1;
}

.glitch {
    font-size: 5em;
    font-weight: 900;
    letter-spacing: -2px;
    margin-bottom: 20px;
    position: relative;
    background: linear-gradient(135deg, var(--dark), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes glitchAnim {
    0%, 90%, 100% { transform: translate(0); }
    92% { transform: translate(-2px, 2px); }
    94% { transform: translate(2px, -2px); }
    96% { transform: translate(-2px, -2px); }
    98% { transform: translate(2px, 2px); }
}

.typing-effect {
    font-size: 2em;
    color: var(--gray);
    margin-bottom: 30px;
    position: relative;
}

.typing-effect::after {
    content: '|';
    color: var(--primary);
    animation: blink 0.8s infinite;
}

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

.tech-stack-header {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.tech-tag {
    padding: 12px 28px;
    background: rgba(79, 70, 229, 0.08);
    border: 2px solid rgba(79, 70, 229, 0.3);
    border-radius: 30px;
    font-weight: 700;
    font-size: 1.1em;
    color: var(--primary);
    transition: all 0.4s;
}

.tech-tag:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.3);
    border-color: var(--primary);
}

/* Contact Bar */
.contact-bar {
    display: flex;
    justify-content: space-around;
    gap: 30px;
    margin-top: 50px;
    padding: 30px;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 20px;
    border: 1px solid rgba(203, 213, 225, 0.5);
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--dark);
    text-decoration: none;
    transition: all 0.3s;
    padding: 10px 20px;
    border-radius: 10px;
}

.contact-item:hover {
    background: rgba(79, 70, 229, 0.08);
    transform: translateY(-3px);
}

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

/* Content Layout */
.cv-content {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 0;
}

/* Sidebar */
.cv-sidebar {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.02), rgba(6, 182, 212, 0.02));
    border-right: 2px solid rgba(203, 213, 225, 0.4);
    padding: 60px 40px;
}

.cv-main {
    padding: 60px;
    background: var(--bg-white);
}

/* Sections */
.cv-section {
    margin-bottom: 60px;
    animation: fadeInUp 0.8s ease;
}

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

.section-title {
    font-size: 2em;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--dark);
    position: relative;
    padding-bottom: 15px;
    font-weight: 800;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--gradient);
    border-radius: 3px;
}

.section-title i {
    color: var(--primary);
    font-size: 0.8em;
}

.section-content {
    color: var(--gray);
    line-height: 1.8;
}

/* Skills */
.skill-category {
    margin-bottom: 35px;
}

.skill-category h3 {
    color: var(--dark);
    font-size: 1.2em;
    margin-bottom: 20px;
    font-weight: 700;
}

.skill-item {
    margin-bottom: 20px;
}

.skill-item span {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

.skill-bar {
    height: 10px;
    background: rgba(203, 213, 225, 0.4);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.skill-progress {
    height: 100%;
    background: var(--gradient);
    border-radius: 10px;
    width: 0;
    animation: fillBar 1.5s ease forwards;
    position: relative;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

@keyframes fillBar {
    to {
        width: var(--width);
    }
}

.skill-progress[data-progress="90"] {
    --width: 90%;
}

.skill-progress[data-progress="85"] {
    --width: 85%;
}

.skill-progress[data-progress="95"] {
    --width: 95%;
}

.skill-progress[data-progress="88"] {
    --width: 88%;
}

.skill-progress[data-progress="92"] {
    --width: 92%;
}

.skill-progress[data-progress="87"] {
    --width: 87%;
}

.tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.badge {
    padding: 8px 18px;
    background: rgba(79, 70, 229, 0.08);
    border: 1px solid rgba(79, 70, 229, 0.3);
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    color: var(--primary);
    transition: all 0.3s;
}

.badge:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    border-color: var(--primary);
}

/* Languages */
.language-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.language-level {
    display: flex;
    gap: 5px;
}

.language-level i {
    color: var(--primary);
    font-size: 0.8em;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--accent));
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
}

.timeline-dot {
    position: absolute;
    left: -46px;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 20px var(--primary);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }
}

.timeline-content {
    background: rgba(248, 250, 252, 0.6);
    padding: 30px;
    border-radius: 15px;
    border: 2px solid rgba(203, 213, 225, 0.5);
    transition: all 0.4s;
    position: relative;
    overflow: hidden;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(79, 70, 229, 0.08), transparent);
    transition: left 0.6s;
}

.timeline-content:hover::before {
    left: 100%;
}

.timeline-content:hover {
    transform: translateX(10px);
    box-shadow: 0 8px 30px rgba(79, 70, 229, 0.15);
    border-color: var(--primary);
    background: rgba(248, 250, 252, 1);
}

.timeline-date {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.timeline-content h3 {
    color: var(--dark);
    font-size: 1.6em;
    margin-bottom: 8px;
    font-weight: 700;
}

.timeline-content h4 {
    color: var(--gray);
    font-size: 1.2em;
    margin-bottom: 15px;
    font-weight: 600;
}

.timeline-content ul {
    list-style: none;
    margin: 20px 0;
}

.timeline-content li {
    padding-left: 25px;
    position: relative;
    margin-bottom: 10px;
}

.timeline-content li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

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

.tech-tags span {
    padding: 6px 16px;
    background: rgba(79, 70, 229, 0.1);
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 600;
    color: var(--primary);
    border: 1px solid rgba(79, 70, 229, 0.2);
}

/* Education */
.education-grid {
    display: grid;
    gap: 30px;
}

.education-item {
    display: flex;
    gap: 25px;
    background: rgba(248, 250, 252, 0.6);
    padding: 30px;
    border-radius: 15px;
    border: 2px solid rgba(203, 213, 225, 0.5);
    transition: all 0.4s;
}

.education-item:hover {
    background: rgba(248, 250, 252, 1);
    transform: translateX(10px);
    box-shadow: 0 8px 30px rgba(79, 70, 229, 0.15);
    border-color: var(--primary);
}

.education-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
    flex-shrink: 0;
}

.education-content h3 {
    color: var(--dark);
    font-size: 1.4em;
    margin-bottom: 10px;
    font-weight: 700;
}

.education-school {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 5px;
}

.education-year {
    color: var(--gray);
    font-size: 0.9em;
    margin-bottom: 10px;
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.project-card {
    background: var(--bg-white);
    padding: 35px;
    border-radius: 20px;
    border: 2px solid rgba(203, 213, 225, 0.6);
    transition: all 0.5s;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.08), transparent);
    transition: all 0.6s;
}

.project-card:hover::before {
    top: -10%;
    right: -10%;
    transform: rotate(45deg);
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 12px 40px rgba(79, 70, 229, 0.2);
}

.project-number {
    font-size: 4em;
    font-weight: 900;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.3;
    line-height: 1;
    margin-bottom: 15px;
}

.project-card h3 {
    color: var(--dark);
    font-size: 1.5em;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
    font-weight: 700;
}

.project-card p {
    color: var(--gray);
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.project-tech {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.project-tech span {
    padding: 5px 14px;
    background: rgba(79, 70, 229, 0.1);
    border: 1px solid rgba(79, 70, 229, 0.2);
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
    color: var(--primary);
}

.project-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    position: relative;
    z-index: 1;
}

.project-link:hover {
    gap: 15px;
    color: var(--accent);
}

.project-link i {
    transition: transform 0.3s;
}

.project-link:hover i {
    transform: translateX(5px);
}

/* Footer */
.cv-footer {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.03), rgba(6, 182, 212, 0.03));
    border-top: 2px solid rgba(203, 213, 225, 0.5);
    padding: 50px 60px;
    text-align: center;
}

.footer-content p {
    font-size: 1.3em;
    color: var(--gray);
    margin-bottom: 25px;
    font-weight: 600;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-outline,
.btn-primary {
    padding: 15px 40px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1.1em;
    text-decoration: none;
    transition: all 0.4s;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

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

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.3);
}

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

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(79, 70, 229, 0.4);
}

/* Responsive */
@media (max-width: 1200px) {
    .cv-content {
        grid-template-columns: 1fr;
    }

    .cv-sidebar {
        border-right: none;
        border-bottom: 2px solid rgba(102, 126, 234, 0.2);
    }

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

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .glitch {
        font-size: 3em;
    }

    .typing-effect {
        font-size: 1.5em;
    }

    .contact-bar {
        flex-direction: column;
    }

    .cv-sidebar,
    .cv-main {
        padding: 40px 30px;
    }

    .timeline {
        padding-left: 30px;
    }

    .education-item {
        flex-direction: column;
    }

    body {
        cursor: auto;
    }

    .cursor-dot,
    .cursor-outline {
        display: none;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
        cursor: auto;
    }

    .cv-container {
        box-shadow: none;
        background: white;
    }

    .cursor-dot,
    .cursor-outline,
    #particles-js,
    .cv-footer {
        display: none;
    }

    .cv-header,
    .cv-sidebar,
    .timeline-content,
    .education-item,
    .project-card {
        background: white !important;
        border-color: #ccc !important;
    }

    .section-title,
    .timeline-content h3,
    .education-content h3,
    .project-card h3 {
        color: black !important;
    }
}
