/* ===============================================
   GLOBAL STYLES & RESET
   =============================================== */

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

:root {
    /* Colors */
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --text-light: #f1f5f9;
    --text-gray: #94a3b8;
    --card-bg: #1e293b;
    --border-color: #334155;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    --gradient-dark: linear-gradient(180deg, #0f172a 0%, #020617 100%);
    
    /* Spacing */
    --section-padding: 100px 0;
    
    /* Transitions */
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-darker);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

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

.section {
    padding: var(--section-padding);
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    text-align: center;
    color: var(--text-gray);
    font-size: 1.1rem;
    max-width: 600px;
    margin: -30px auto 50px;
}

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

/* ===============================================
   NAVIGATION
   =============================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.95);
    border-bottom-color: var(--border-color);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

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

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

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

.language-switcher {
    display: flex;
    gap: 5px;
    background: var(--card-bg);
    padding: 5px;
    border-radius: 8px;
    margin-left: 20px;
}

.language-dropdown {
    display: none;
}

.lang-btn {
    padding: 8px 15px;
    background: transparent;
    color: var(--text-gray);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.lang-btn:hover {
    color: var(--text-light);
    background: var(--bg-dark);
}

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

.lang-select {
    padding: 8px 30px 8px 12px;
    background: var(--card-bg);
    color: var(--text-light);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    font-family: inherit;
    transition: var(--transition);
    appearance: none;
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><path fill="%23f1f5f9" d="M6 9L1 4h10z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.lang-select:hover {
    border-color: var(--primary-color);
}

.lang-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

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

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-light);
    transition: var(--transition);
}

/* ===============================================
   HERO SECTION
   =============================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: var(--gradient-dark);
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-particles::before,
.hero-particles::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.2;
    animation: float 20s infinite;
}

.hero-particles::before {
    background: var(--primary-color);
    top: 10%;
    left: 10%;
}

.hero-particles::after {
    background: var(--accent-color);
    bottom: 10%;
    right: 10%;
    animation-delay: -10s;
}

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

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-gray);
    margin-bottom: 15px;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 30px;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 2px solid transparent;
}

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

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

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

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

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

.social-links a {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--card-bg);
    color: var(--text-light);
    font-size: 1.2rem;
    transition: var(--transition);
}

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

.profile-card {
    position: relative;
}

.profile-img-wrapper {
    position: relative;
    width: 400px;
    height: 400px;
    margin: 0 auto;
}

.profile-img-wrapper::before {
    content: '';
    position: absolute;
    inset: -5px;
    background: var(--gradient-primary);
    border-radius: 50%;
    z-index: -1;
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--bg-dark);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-indicator span {
    width: 2px;
    height: 40px;
    background: var(--gradient-primary);
    display: block;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0%, 100% { opacity: 0; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(10px); }
}

/* ===============================================
   ABOUT SECTION
   =============================================== */

.about {
    background: var(--bg-dark);
    overflow-x: hidden;
    width: 100%;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    min-width: 0;
    width: 100%;
    overflow: hidden;
}

.about-text {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    overflow-x: hidden;
}

.about-image {
    min-width: 0;
    max-width: 100%;
    width: 100%;
}

.about-description {
    color: var(--text-gray);
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.8;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    max-width: 100%;
    width: 100%;
    white-space: normal;
    overflow-x: hidden;
}

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

.stat-item {
    text-align: center;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 10px;
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.code-window {
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.window-header {
    padding: 12px 15px;
    background: #1a1f2e;
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.code-content {
    padding: 25px;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
    overflow-x: auto;
}

.code-content code {
    color: #e2e8f0;
}

/* ===============================================
   SKILLS SECTION
   =============================================== */

.skills {
    background: var(--bg-darker);
}

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

.skill-category {
    background: var(--card-bg);
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid transparent;
}

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

.category-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.skill-category h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.skill-tag {
    background: var(--bg-dark);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-light);
    transition: var(--transition);
}

.skill-tag:hover {
    background: var(--primary-color);
}

/* ===============================================
   PROJECTS SECTION
   =============================================== */

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

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.project-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border-color: var(--primary-color);
}

.project-image {
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.project-card:nth-child(2) .project-image {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.project-card:nth-child(3) .project-image {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.project-card:nth-child(4) .project-image {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

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

.project-link {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-dark);
    font-size: 1.5rem;
    transition: var(--transition);
}

.project-link:hover {
    transform: scale(1.1);
}

.project-content {
    padding: 25px;
}

.project-content h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.project-content p {
    color: var(--text-gray);
    margin-bottom: 20px;
    line-height: 1.6;
}

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

.tag {
    background: var(--bg-dark);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    color: var(--primary-color);
}

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

.project-btn {
    flex: 1;
    text-align: center;
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.project-btn:hover {
    background: var(--secondary-color);
}

.projects-cta {
    text-align: center;
}

/* ===============================================
   CONTACT SECTION
   =============================================== */

.contact {
    background: var(--bg-darker);
}

.contact-content-center {
    display: flex;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    display: flex;
    gap: 20px;
    align-items: center;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.contact-details h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.contact-details a {
    color: var(--text-gray);
    text-decoration: none;
    transition: var(--transition);
}

.contact-details a:hover {
    color: var(--primary-color);
}

/* ===============================================
   FOOTER
   =============================================== */

.footer {
    background: var(--bg-darker);
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--card-bg);
    color: var(--text-light);
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--gradient-primary);
}

/* ===============================================
   BACK TO TOP BUTTON
   =============================================== */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
}

/* ===============================================
   RESPONSIVE DESIGN
   =============================================== */

@media (max-width: 968px) {
    .hero-content,
    .about-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .about-text,
    .about-image {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
    
    .hero-text {
        text-align: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .profile-img-wrapper {
        width: 300px;
        height: 300px;
    }
    
    .about-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .language-switcher {
        margin-left: 0;
        margin-right: 15px;
    }
    
    .language-dropdown {
        display: none;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        flex-direction: column;
        background: var(--card-bg);
        width: 250px;
        padding: 30px;
        border-radius: 10px 0 0 10px;
        transition: var(--transition);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -8px);
    }
}

@media (max-width: 768px) {
    .hero-title {
        padding-top: 1em;
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .profile-img-wrapper {
        width: 250px;
        height: 250px;
    }
    
    .language-switcher {
        display: none;
    }
    
    .language-dropdown {
        display: block;
        margin-left: 10px;
    }
    
    .navbar .container {
        flex-wrap: wrap;
    }
}
