:root {
    --bg-color: #0d0d12;
    --text-main: #ffffff;
    --text-muted: #889cb5;
    --accent-color: #DA5D03;
    --accent-gradient: linear-gradient(135deg, #DA5D03, #B34002);
    --glass-bg: rgba(30, 30, 30, 0.5);
    --glass-border: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

.mesh-login-bg {
    position: fixed; 
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    z-index: -1; 
    pointer-events: none;
    background: var(--bg-color);

}
.mesh-blob {
    position: absolute; border-radius: 50%; filter: blur(90px);
    opacity: 0.5; animation: floatBlobs 12s infinite ease-in-out alternate;
    will-change: transform;
}
.mesh-blob.b1 { width: 350px; height: 350px; background: #DA5D03; top: -100px; left: -100px; }
.mesh-blob.b2 { width: 450px; height: 450px; background: #8A2BE2; bottom: -150px; right: -150px; animation-delay: -3s; }
.mesh-blob.b3 { width: 250px; height: 250px; background: #005FF9; top: 40%; left: 30%; animation-delay: -6s; opacity: 0.3; }

@keyframes floatBlobs {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -50px) scale(1.1); }
    100% { transform: translate(-40px, 20px) scale(0.9); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px; 
    width: 100%;
    box-sizing: border-box;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.accent { color: var(--accent-color); }
.section-title { font-size: 36px; font-weight: 800; margin-bottom: 40px; text-align: center; }
.section-title.left-align { text-align: left; margin-bottom: 24px; }

.navbar {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px); 
    max-width: 1200px;
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    z-index: 1000;
}
.nav-content { width: 100%; display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 22px; font-weight: 800; letter-spacing: 0.5px;}
.nav-controls { display: flex; align-items: center; gap: 16px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 24px; border-radius: 16px; font-weight: 700; text-decoration: none;
    transition: transform 0.2s, filter 0.2s, box-shadow 0.2s; cursor: pointer;
}
.btn:active { transform: scale(0.95); }
.btn-primary { 
    background: var(--accent-gradient); color: white; 
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1), 0 4px 15px rgba(218, 93, 3, 0.4); 
}
.btn-secondary { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); color: white; }

.btn-content-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.btn-subtext {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.7;
    letter-spacing: 0.5px;
}

.lang-toggle {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: white;
    padding: 8px 12px; border-radius: 12px; cursor: pointer; font-family: 'Outfit'; font-weight: 600;
    transition: background 0.2s;
}
.lang-toggle:hover { background: rgba(255,255,255,0.1); }
.lang-toggle span { opacity: 0.4; transition: 0.2s; }
.lang-toggle span.active { opacity: 1; color: var(--accent-color); font-weight: 800; }

.hero {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    text-align: center; padding-top: 80px;
}
.hero-badge {
    display: inline-block; padding: 6px 16px; border-radius: 20px;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    font-size: 14px; font-weight: 600; margin-bottom: 24px; color: #ccc;
}
.hero-title { font-size: 5vw; line-height: 1.1; margin-bottom: 24px; letter-spacing: -1px; }
.hero-subtitle { font-size: 18px; color: var(--text-muted); max-width: 650px; margin: 0 auto 32px auto; }
.hero-actions { display: flex; gap: 16px; justify-content: center; }

.skills, .projects, .about { padding-top: 80px; padding-bottom: 80px; }
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.skill-card { padding: 32px; transition: transform 0.3s; }
.skill-card:hover { transform: translateY(-5px); border-color: rgba(255,255,255,0.2); }
.skill-icon { font-size: 40px; margin-bottom: 16px; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5)); }
.skill-card h3 { font-size: 20px; margin-bottom: 12px; }
.skill-card p { color: var(--text-muted); font-size: 15px; }

.about-grid { display: grid; grid-template-columns: 1fr; gap: 24px; max-width: 900px; margin: 0 auto; }
.about-text { padding: 40px; }
.about-text p { color: var(--text-muted); font-size: 16px; margin-bottom: 16px; line-height: 1.7; }
.stats-row { display: flex; gap: 24px; margin-top: 32px; padding-top: 24px; border-top: 1px dashed rgba(255,255,255,0.1); }
.stat-item { flex: 1; }
.stat-val { font-size: 36px; font-weight: 800; color: var(--accent-color); line-height: 1; margin-bottom: 8px; }
.stat-lbl { font-size: 13px; color: #888; font-weight: 600; text-transform: uppercase; }

.project-card {
    display: flex; gap: 40px; padding: 40px; margin-bottom: 40px; align-items: center;
}
.project-card.reverse { flex-direction: row-reverse; }
.project-info { flex: 1; }
.project-visual { flex: 1; display: flex; justify-content: center; align-items: center; }

.app-icon-showcase {
    position: relative; width: 200px; height: 200px;
    display: flex; justify-content: center; align-items: center;
}
.app-icon-showcase::before {
    content: ''; position: absolute; width: 140%; height: 140%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    z-index: 0; pointer-events: none;
}
.floating-icon {
    width: 160px; height: 160px; z-index: 1;
    border-radius: 22.5%;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    animation: floatIcon 6s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.project-badge { display: inline-block; padding: 6px 14px; background: rgba(218, 93, 3, 0.1); color: var(--accent-color); border-radius: 20px; font-size: 13px; font-weight: 800; margin-bottom: 16px; border: 1px solid rgba(218, 93, 3, 0.3); }
.project-name { font-size: 32px; margin-bottom: 16px; line-height: 1.2; }
.project-desc { color: var(--text-muted); margin-bottom: 24px; font-size: 16px; }
.project-tags { margin-bottom: 24px; }
.project-tags span { display: inline-block; padding: 6px 12px; background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border); border-radius: 8px; font-size: 12px; font-weight: 600; margin: 0 8px 8px 0; color: #ccc; }
.project-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.contact { padding-top: 40px; padding-bottom: 100px; text-align: center; }
.contact-panel { padding: 60px 20px; max-width: 800px; margin: 0 auto; background: linear-gradient(135deg, rgba(30,30,30,0.6) 0%, rgba(218,93,3,0.1) 100%); }
.contact-panel p { color: var(--text-muted); font-size: 18px; margin-top: 16px; }

footer { text-align: center; padding: 32px; color: #666; font-size: 14px; border-top: 1px solid var(--glass-border); }

@media (max-width: 768px) {
    .container {
        padding-left: 20px; 
        padding-right: 20px; 
    }
    .skill-card {
        padding: 24px; 
    }
    .hero-title { font-size: 40px; }
    .hero-subtitle { font-size: 16px; }
    .hero-actions { flex-direction: column; width: 100%; max-width: 100%; margin: 0 auto; gap: 12px; }
    .hero-actions .btn { width: 100%; } 

    .project-card, .project-card.reverse { flex-direction: column; padding: 24px; gap: 32px; }
    .project-visual { order: -1; }
    .app-icon-showcase { width: 150px; height: 150px; }
    .floating-icon { width: 120px; height: 120px; }

    .about-text { padding: 24px; }

    .contact-panel { padding: 40px 20px; }

    .project-gallery {
    width: 100%;
    position: relative;
    }

}

@media (max-width: 480px) {
    .logo { font-size: 20px; }
    .lang-toggle { padding: 6px 8px; font-size: 14px; }
    .btn-nav { display: none; }
    .section-title { font-size: 28px; margin-bottom: 24px; }
}

.project-gallery {
    width: 100%;
    position: relative;
}

.gallery-scroll {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 12px; 
    padding: 10px; 
}

.gallery-scroll::-webkit-scrollbar {
    display: none;
}

.gallery-scroll img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #111; 
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
    will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
    .gallery-scroll img:hover {
        transform: scale(1.05);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
        z-index: 2;
        position: relative;
    }

    .btn:hover {
        transform: scale(1.05);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    }

    .btn-primary:hover {
        box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2), 0 10px 25px rgba(218, 93, 3, 0.6);
    }

    .clickable-icon:hover {
        transform: scale(1.1);
    }
}

.clickable-icon {
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.lightbox.active img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    z-index: 10000;
    transition: color 0.2s;
    line-height: 1;
}

.lightbox-close:hover {
    color: var(--accent-color);
}

.tech-tag {
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1), background 0.2s, box-shadow 0.2s;
}

@media (hover: hover) and (pointer: fine) {
    .tech-tag:hover {
        transform: translateY(-3px);
        background: rgba(255, 255, 255, 0.15);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    }
}

.tech-modal-content {
    position: relative;
    max-width: 500px;
    width: 90%;
    padding: 40px;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 10000;
}

.lightbox.active .tech-modal-content {
    transform: scale(1);
}

.tech-modal-content h3 {
    font-size: 26px;
    margin-bottom: 16px;
    color: var(--accent-color);
}

.tech-modal-content p {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.6;
}

.tech-close {
    top: 15px;
    right: 20px;
    font-size: 30px;
}

html.custom-scroll {
    scrollbar-width: none; 
    -ms-overflow-style: none; 
}
html.custom-scroll::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.ios-scroll-track {
    position: fixed;
    top: 2px;
    right: 2px;
    bottom: 2px;
    width: 8px;
    z-index: 9998; 
    pointer-events: none; 
}

.ios-scroll-thumb {
    position: absolute;
    top: 0;
    right: 0;
    width: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    opacity: 0;
    transition: opacity 0.4s ease, background 0.2s, width 0.2s;
    pointer-events: auto; 
    cursor: grab;
}

.ios-scroll-thumb.visible {
    opacity: 1;
}

.ios-scroll-thumb:hover, .ios-scroll-thumb:active {
    background: rgba(255, 255, 255, 0.6);
    width: 8px;
}

.ios-scroll-thumb:active {
    cursor: grabbing;
}