:root {
  --primary-color: #14b8a6;
  --primary-dark: #0d9488;
  --secondary-color: #0f172a;
  --accent-color: #f59e0b;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  
  --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-heavy: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}


body.dark-mode {
  --primary-color: #14b8a6;
  --primary-dark: #0d9488;
  --secondary-color: #f8fafc;
  --accent-color: #fbbf24;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  
  --bg-gradient: linear-gradient(135deg, #0f172a 0%, #0d9488 100%);
}

*{margin:0;padding:0;box-sizing:border-box}
html { scroll-behavior: smooth; } 
body{overflow-x:hidden;font-family:'Inter',sans-serif;color:var(--text-primary);background:var(--bg-secondary);line-height:1.6;overflow-x:hidden;transition:background .3s ease,color .3s ease}
a{text-decoration:none;color:inherit}


#loader-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #000;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1);
}
#loader-screen.fade-out { opacity: 0; pointer-events: none; }
.loader-content { text-align: center; position: relative; }
.loader-text { font-family: 'Inter', sans-serif; color: #fff; font-size: clamp(2rem, 5vw, 4rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; position: relative; overflow: hidden; }
.text-line { display: block; position: relative; opacity: 0; transform: translateY(50px); }
.text-line.first { animation: slideInFade 0.8s cubic-bezier(0.65, 0, 0.35, 1) 0.3s forwards; }
.text-line.second { animation: slideInFade 0.8s cubic-bezier(0.65, 0, 0.35, 1) 1s forwards; }
.text-line::before, .text-line::after { content: attr(data-text); position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; }
.text-line::before { animation: glitch1 2s infinite linear 2s; color: #ff00ff; z-index: -1; }
.text-line::after { animation: glitch2 2s infinite linear 2s; color: #00ffff; z-index: -1; }
@keyframes slideInFade { 0% { opacity: 0; transform: translateY(50px); filter: blur(10px); } 100% { opacity: 1; transform: translateY(0); filter: blur(0); } }
@keyframes glitch1 { 0%, 100% { opacity: 0; } 33% { opacity: 0; } 33.02% { opacity: 0.8; transform: translate(-2px, -2px); } 33.04% { opacity: 0; transform: translate(0, 0); } }
@keyframes glitch2 { 0%, 100% { opacity: 0; } 66% { opacity: 0; } 66.02% { opacity: 0.8; transform: translate(2px, 2px); } 66.04% { opacity: 0; transform: translate(0, 0); } }
.loader-progress { position: absolute; bottom: -30px; left: 50%; transform: translateX(-50%); width: 200px; height: 2px; background: rgba(255, 255, 255, 0.1); border-radius: 1px; overflow: hidden; opacity: 0; animation: fadeIn 0.5s ease 1.5s forwards; }
.loader-progress-bar { width: 0%; height: 100%; background: linear-gradient(90deg, var(--primary-color), var(--primary-dark), var(--primary-color)); background-size: 200% 100%; animation: progressFill 1.5s cubic-bezier(0.4, 0, 0.2, 1) 1.8s forwards, gradientShift 2s linear infinite; border-radius: 1px; }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes progressFill { to { width: 100%; } }
@keyframes gradientShift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.particles { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; pointer-events: none; }
.particle { position: absolute; width: 2px; height: 2px; background: rgba(255, 255, 255, 0.3); border-radius: 50%; animation: float 10s infinite linear; }
@keyframes float { from { transform: translateY(100vh) translateX(0); opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } to { transform: translateY(-100vh) translateX(100px); opacity: 0; } }

#main-site { opacity: 0; visibility: hidden; transition: opacity 0.8s ease, visibility 0.8s ease; }
#main-site.visible { opacity: 1; visibility: visible; }


.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(20, 184, 166, 0.1); /* Teal 10% */
    z-index: 1001;
    transition: opacity 0.3s ease;
}
.scroll-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark), var(--primary-color));
    background-size: 200% 100%;
    width: 0%;
    transition: width 0.1s ease;
    animation: progressGradient 2s ease infinite;
}
body.dark-mode .scroll-progress { background: rgba(20, 184, 166, 0.2); /* Teal 20% */ }
@keyframes progressGradient { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }


.theme-toggle {
    position: fixed;
    right: 1rem;
    top: 1rem;
    z-index: 1100;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: var(--text-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: var(--shadow-medium);
    transition: transform .3s ease;
}
.theme-toggle:hover { transform: scale(1.05); }
body.dark-mode .theme-toggle { background: var(--primary-color); color: #fff; }


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




header {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--primary-color);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(20, 184, 166, 0.1); /* Teal 10% */
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}
body.dark-mode header{ background:rgba(15,23,42,.9); border-bottom: 1px solid rgba(20, 184, 166, 0.2); }
body.dark-mode .desktop-nav a { color: var(--text-primary); }
body.dark-mode .desktop-nav a::after { background: var(--text-primary); }

body.dark-mode .hero{background:var(--bg-primary);}

.desktop-nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}
.nav-image img { width: 50px; height: 50px; border-radius: 50%; border: 6px solid rgba(255, 255, 255, 0.2); box-shadow: var(--shadow-medium); transition: transform 0.3s ease; }
.nav-image:hover img { transform: scale(1.05); }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { font-weight: 500; position: relative; text-decoration: none; color: var(--bg-primary); }
.nav-links a::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px; background: var(--bg-primary); transition: width 0.3s ease; }
.nav-links a:hover::after { width: 100%; }


.mobile-nav { display: none; justify-content: space-between; align-items: center; padding: 1rem 2rem; position: relative; z-index: 1002; }
.mobile-logo img { width: 40px; height: 40px; border-radius: 50%; }
.hamburger { display: flex; flex-direction: column; cursor: pointer; padding: 8px; background: none; border: none; z-index: 1003; position: relative; right: 2rem; }
.hamburger span { width: 25px; height: 3px; background: var(--text-primary); margin: 2px 0; transition: all 0.3s ease; border-radius: 2px; }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -6px); }
body.dark-mode .hamburger span { background: #f8fafc; }


.offcanvas-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: rgba(0, 0, 0, 0.5); z-index: 1000; opacity: 0; visibility: hidden; transition: all 0.3s ease; }
.offcanvas-overlay.active { opacity: 1; visibility: visible; }
.offcanvas { position: fixed; top: 0; right: -100%; width: 280px; height: 100vh; background: var(--bg-primary); z-index: 1001; transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1); overflow-y: auto; }
.offcanvas.active { right: 0; }
.offcanvas-header { padding: 2rem; border-bottom: 1px solid rgba(20, 184, 166, 0.1); text-align: center; }
.offcanvas-header img { width: 60px; height: 60px; border-radius: 50%; border: 4px solid var(--primary-color); margin-bottom: 1rem; }
.offcanvas-header h3 { color: var(--text-primary); font-size: 1.2rem; font-weight: 600; }
.offcanvas-header p { color: var(--primary-color); font-size: 0.9rem; margin-top: 0.5rem; }
.offcanvas-body { padding: 1rem 0; }
.offcanvas-nav { list-style: none; }
.offcanvas-nav a { display: flex; align-items: center; gap: 1rem; padding: 1rem 2rem; color: var(--text-primary); text-decoration: none; font-weight: 500; transition: all 0.3s ease; position: relative; overflow: hidden; }
.offcanvas-nav a::before { content: ''; position: absolute; left: 0; top: 0; width: 4px; height: 100%; background: var(--primary-color); transform: scaleY(0); transition: transform 0.3s ease; }
.offcanvas-nav a:hover { background: rgba(20, 184, 166, 0.05); padding-left: 2.5rem; }
.offcanvas-nav a:hover::before { transform: scaleY(1); }
.offcanvas-nav i { font-size: 1.1rem; color: var(--primary-color); width: 20px; text-align: center; }
.offcanvas-footer { position: absolute; bottom: 0; left: 0; right: 0; padding: 2rem; text-align: center; border-top: 1px solid rgba(20, 184, 166, 0.1); background: var(--bg-primary); }
.offcanvas-footer p { font-size: 0.8rem; color: var(--text-primary); opacity: 0.7; }
body.dark-mode .offcanvas { background: #1e293b; box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3); }


.hero{min-height:100vh;display:flex;align-items:center;background:var(--primary-color);background-size:400% 400%;position:relative;color:#fff;padding:0 2rem}
.hero::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat; opacity: 0.3; }
.hero-content { max-width: 1200px; margin: 0 auto; padding: 0 2rem; display: grid; grid-template-columns: 1fr 300px; gap: 4rem; align-items: center; position: relative; z-index: 2; }
.hero-text h1 { font-size: clamp(3rem, 8vw, 4.5rem); font-weight: 800; color: white; margin-bottom: 1rem; line-height: 1.1; }
.hero-text p { font-size: 1.1rem; color: rgba(255, 255, 255, 0.8); margin-bottom: 2rem; line-height: 1.7; }
.cta-button { display: inline-flex; align-items: center; gap: 0.5rem; background: white; color: var(--primary-color); padding: 1rem 2rem; border: none; border-radius: 50px; font-weight: 600; font-size: 1.1rem; cursor: pointer; transition: all 0.3s ease; text-decoration: none; box-shadow: var(--shadow-medium); }
.cta-button:hover { transform: translateY(-2px); box-shadow: var(--shadow-heavy); background: var(--bg-secondary); }
.hero-image {
    position: relative;
}

.skills-list{
    width: fit-content;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.code-snippet-wrapper {
    background: #1d1f21;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    border: 1px solid #333;
    width: fit-content;
    align-self: center;
    margin: 2rem;
}

.code-header {
    background: #2d2d2d;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #444;
}

.code-dots {
    display: flex;
    gap: 6px;
}

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

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

.code-title {
    color: #888;
    font-size: 12px;
    margin-left: 12px;
}

pre[class*="language-"] {
    margin: 0;
    padding: 24px 20px;
    border-radius: 0;
    background: #1d1f21;
    font-size: 16px;
    line-height: 1.4;
    overflow-x: auto;
    white-space: pre;
}

code[class*="language-"] {
    font-family: 'Courier New', Consolas, Monaco, monospace;
    font-size: 16px;
    line-height: 1.4;
    white-space: pre;
}


.line-numbers .line-numbers-rows {
    border-right: 1px solid #444;
    padding-right: 10px;
}

.line-numbers-rows > span:before {
    color: #858585;
}


@media (max-width: 768px) {
    body {
        align-items: flex-start;
        padding-top: 60px;
    }
    
    .hero-content{
        margin-top: -15rem;
        max-height: 100vh;
    }

    .mobile-logo a img {
        margin-left: 1rem;
    }

    .hero-image {
        max-width: 100%;
    }

    pre[class*="language-"] {
        padding: 20px 16px;
        font-size: 13px;
    }

    code[class*="language-"] {
        font-size: 13px;
    }
}

@media (max-width: 480px) {

    pre[class*="language-"] {
        padding: 16px 12px;
        font-size: 11px;
    }

    code[class*="language-"] {
        font-size: 11px;
    }

    .code-header {
        padding: 10px 12px;
    }

    .code-title {
        font-size: 10px;
    }

    .dot {
        width: 9px;
        height: 9px;
    }
}



section{padding:6rem 0}
.section-title{text-align:center;font-size:2.5rem;font-weight:700;margin-bottom:1rem}
.section-subtitle{text-align:center;font-size:1.2rem;color:var(--text-secondary);max-width:600px;margin:0 auto 4rem}
.container{max-width:1200px;margin:0 auto;padding:0 2rem}


.skills-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:2rem;}
.skill-category{background:var(--bg-primary);padding:2rem;border-radius:20px;box-shadow:var(--shadow-medium);transition:transform .3s ease}
.skill-category:hover{transform:translateY(-5px)}
.skill-category h3{font-size:1.4rem;font-weight:600;margin-bottom:1.5rem;display:flex;align-items:center;gap:.5rem}
.skills-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:1rem}
.skill-item{background:var(--bg-secondary);padding:.75rem 1rem;border-radius:10px;text-align:center;font-weight:500;transition:all .3s ease;border:2px solid transparent}
.skill-item:hover{border-color:var(--primary-color);transform:translateY(-2px)}


.services { background: var(--bg-primary); }
.services-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:2rem; }
.service-card { background:var(--bg-secondary); padding:2.5rem 2rem; border-radius:20px; box-shadow:var(--shadow-light); transition:transform .3s ease, box-shadow .3s ease; border: 1px solid rgba(20, 184, 166, 0.1); }
.service-card:hover { transform:translateY(-5px); box-shadow: var(--shadow-medium); }
.service-card i { font-size:2.5rem; margin-bottom:1.5rem; color:var(--primary-color); }
.service-card h4 { font-size: 1.3rem; margin-bottom: 1rem; }


.about { padding: 6rem 0; background: var(--bg-secondary); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.about-text h3 { font-size: 1.8rem; font-weight: 600; color: var(--text-primary); margin-bottom: 1rem; }
.about-text p { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 1.5rem; line-height: 1.7; }
.location { display: flex; align-items: center; gap: 0.5rem; color: var(--primary-color); font-weight: 500; margin-bottom: 2rem; }
.soft-skills-list { list-style: none; }
.soft-skills-list li { padding: 0.75rem 0; color: var(--text-secondary); position: relative; padding-left: 2rem; }
.soft-skills-list li::before { content: '✓'; position: absolute; left: 0; color: var(--primary-color); font-weight: bold; }


.portfolio { padding: 6rem 0; background: var(--bg-primary); } 
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 2rem; margin-top: 3rem; }
.project-card { background: var(--bg-primary); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-medium); border: 1px solid rgba(20, 184, 166, 0.1); transition: all 0.3s ease; }
.project-image { height: 200px; background: var(--bg-gradient); position: relative; overflow: hidden; }
.project-image img { width: 100%; height: 100%; object-fit: cover; }
.project-content { padding: 2rem; }
.project-title { font-size: 1.3rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.5rem; }
.project-year { background: var(--primary-color); color: white; padding: 0.25rem 0.75rem; border-radius: 15px; font-size: 0.8rem; font-weight: 500; display: inline-block; margin-bottom: 1rem; }
.project-link { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--primary-color); text-decoration: none; font-weight: 500; transition: all 0.3s ease; }
.project-link:hover { gap: 1rem; }


.faq { padding: 6rem 0; background: var(--bg-secondary); } 
.faq-slider { position: relative; overflow: hidden; margin-top: 3rem; }
.faq-container { display: flex; transition: transform 0.5s ease; }
.faq-card { min-width: 100%; background: var(--bg-primary); border-radius: 20px; padding: 3rem; }
.faq-question { font-size: 1.5rem; font-weight: 600; color: var(--text-primary); margin-bottom: 1.5rem; text-align: center; }
.faq-answer { font-size: 1.1rem; color: var(--text-secondary); line-height: 1.7; text-align: center; max-width: 700px; margin: 0 auto; }
.faq-answer a { color: var(--primary-color); text-decoration: none; }
.faq-controls { display: flex; justify-content: center; gap: 1rem; margin-top: 2rem; }
.faq-dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(20, 184, 166, 0.3); cursor: pointer; transition: all 0.3s ease; }
.faq-dot.active { background: var(--primary-color); }
.faq-nav { position: absolute; top: 50%; transform: translateY(-50%); background: var(--primary-color); color: white; border: none; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 1.2rem; transition: all 0.3s ease; z-index: 10; }
.faq-nav:hover { background: var(--primary-dark); }
.faq-prev { left: 1rem; }
.faq-next { right: 1rem; }


.contact { padding: 6rem 0; background: var(--bg-primary); }
.contact-card { padding: 5rem; text-align: center; color: white; position: relative; overflow: hidden; background: var(--primary-color); border-radius: 20px; }
.contact-content { position: relative; margin: 2rem auto 2rem auto; z-index: 2; }
.contact-title { font-size: 2.5rem; font-weight: 700; margin-bottom: 1rem; }
.contact-subtitle { font-size: 1.2rem; margin-bottom: 2rem; opacity: 0.9; }
.contact-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin: 3rem 0; }
.contact-feature { text-align: center; }
.contact-feature i { font-size: 2.5rem; margin-bottom: 1rem; opacity: 0.8; }
.contact-feature h4 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; }
.contact-feature p { opacity: 0.8; font-size: 0.9rem; }

body.dark-mode .contact-card { background: var(--bg-primary); }


footer{
  background: var(--bg-secondary);
  color: var(--text-secondary);
  text-align: center;
  padding: 2.5rem 1.5rem;
  margin-top: auto;
  border-top: 1px solid rgba(20, 184, 166, 0.1);
  transition: 0.3s ease, color 0.3s ease;
}
body.dark-mode footer {
  background: #0f172a;
  border-top:1px solid rgba(20, 184, 166, 0.2);
}




@media (max-width: 800px) {
    
    .scroll-progress {
        height: 3px;
    }
    
    
    .desktop-nav {
        display: none;
    }

    .mobile-nav {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.5rem 0rem;
        width: 100%;
    }

    
    header {
        padding: 0.5rem 0;
    }
    .theme-toggle {
        top: 0.8rem;
        right: 5rem;
    }
    .hamburger {
        right: 1rem;
    }

    
    section { padding: 4rem 0; }
    .container { padding: 0 1rem; }

    .section-title { font-size: 2rem; }
    .section-subtitle { font-size: 1rem; margin-bottom: 2rem; }

    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 5rem;
    }
    .hero-image {
        display: none;
    }
    .hero-text h1 { font-size: clamp(2.5rem, 10vw, 3.5rem); }

    
    .about-grid,
    .skills-grid,
    .contact-features,
    .services-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    
    .faq-nav {
        display: none;
    }
    .faq-card {
        padding: 2rem 1.5rem;
    }
    .faq-question { font-size: 1.2rem; }
    .faq-answer { font-size: 0.95rem; }
    
    .contact-card {
        padding: 3rem 1.5rem;
    }
    .contact-title { font-size: 2rem; }
    .contact-subtitle { font-size: 1rem; }
}