:root {
    /* Color Palette - Dark Mode (Default) */
    --primary-color: #00d2ff;
    --secondary-color: #3a7bd5;
    --accent-color: #00d2ff;
    --bg-color: #0b0e14;
    --card-bg: rgba(255, 255, 255, 0.04); /* Slightly more visible glass */
    --text-color: #f0f0f0; /* Brighter for contrast */
    --text-muted: #b0b0b0;
    --nav-bg: rgba(11, 14, 20, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --neon-glow: 0 0 15px rgba(0, 210, 255, 0.4);
    
    /* Transitions */
    --transition-fast: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Mode Override */
body.light-mode {
    --bg-color: #f8f9fa;
    --card-bg: rgba(255, 255, 255, 0.8);
    --text-color: #1a1a1a;
    --text-muted: #555555;
    --nav-bg: rgba(248, 249, 250, 0.9);
    --border-color: rgba(0, 0, 0, 0.05);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.08);
    --neon-glow: 0 0 15px rgba(58, 123, 213, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

/* Premium Background Overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(0, 210, 255, 0.03) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.4;
}

/* Loading Screen */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.8s ease, visibility 0.8s;
}

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

.loader-content {
    text-align: center;
}

.loader-circle {
    width: 60px;
    height: 60px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.loader-text {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.section {
    padding: 120px 0; /* Improved spacing */
}

.section-title {
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    font-weight: 800;
    letter-spacing: -1px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
}

/* Scroll Progress */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    z-index: 10001;
    width: 0;
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
}

/* Scroll to Top */
#scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    color: var(--primary-color);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    box-shadow: var(--glass-shadow);
}

#scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

#scroll-to-top:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-5px);
    box-shadow: var(--neon-glow);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.8rem 0;
    background: var(--nav-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all var(--transition-fast);
}

.navbar.scrolled {
    padding: 1.2rem 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

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

.logo {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-color);
    letter-spacing: -1px;
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
    font-size: 0.95rem;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.3);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition-fast);
    border-radius: 10px;
}

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

.nav-btns {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

#theme-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.3rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

#theme-toggle:hover {
    color: var(--primary-color);
    transform: rotate(20deg) scale(1.1);
}

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

.hamburger span {
    width: 28px;
    height: 2.5px;
    background-color: var(--text-color);
    transition: var(--transition-fast);
    border-radius: 10px;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 800px;
    z-index: 1;
}

.hero h2 {
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, var(--text-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -2px;
}

.hero h3 {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 1.8rem;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-bottom: 3rem;
}

.btn {
    padding: 0.9rem 2.2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all var(--transition-fast);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.95);
}

.btn-primary {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    box-shadow: var(--neon-glow);
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 210, 255, 0.4);
}

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

.btn-outline:hover {
    background: rgba(0, 210, 255, 0.1);
    transform: translateY(-5px);
}

.btn-cv {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.btn-cv:hover {
    background: var(--text-color);
    color: var(--bg-color);
    transform: translateY(-5px);
}

.social-links {
    display: flex;
    gap: 1.8rem;
}

.social-links a {
    font-size: 1.6rem;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-8px) scale(1.1);
    text-shadow: 0 0 15px rgba(0, 210, 255, 0.5);
}

.hero-bg-shapes .shape {
    position: absolute;
    filter: blur(120px);
    z-index: 0;
    border-radius: 50%;
    animation: shape-move 20s infinite alternate;
}

@keyframes shape-move {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

.shape-1 {
    top: 5%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(0, 210, 255, 0.15);
}

.shape-2 {
    bottom: 5%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(58, 123, 213, 0.15);
}

/* About Section */
.about-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 5rem;
    align-items: center;
}

.about-img {
    position: relative;
    perspective: 1000px;
}

.img-frame {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    overflow: hidden;
    border: 5px solid var(--primary-color);
    box-shadow: var(--neon-glow), 0 20px 50px rgba(0,0,0,0.3);
    animation: profile-blob 10s ease-in-out infinite;
    transition: transform 0.5s ease;
}

.about-img:hover .img-frame {
    transform: scale(1.02) rotateY(5deg);
}

@keyframes profile-blob {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    50% { border-radius: 50% 50% 30% 70% / 50% 60% 40% 50%; }
    100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
}

.img-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-info p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.about-info h3 {
    margin: 2rem 0 1.2rem;
    font-size: 1.6rem;
    color: var(--primary-color);
    font-weight: 700;
}

.education-timeline {
    margin-top: 2.5rem;
}

.timeline-item {
    padding-left: 2rem;
    border-left: 2px solid var(--border-color);
    position: relative;
    padding-bottom: 2rem;
}

.timeline-dot {
    position: absolute;
    left: -9px;
    top: 5px;
    width: 16px;
    height: 16px;
    background: var(--bg-color);
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    box-shadow: var(--neon-glow);
}

.timeline-content h4 {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.timeline-content p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.skills-progress {
    margin-top: 2.5rem;
}

.progress-bar {
    margin-bottom: 1.8rem;
}

.progress-bar .info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.6rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.progress-bar .line {
    height: 10px;
    background: var(--border-color);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.progress-bar .line::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 20px;
    width: 0;
    transition: 2s cubic-bezier(0.17, 0.85, 0.438, 0.99);
}

.progress-bar.active .line.html-css::after { width: 95%; }
.progress-bar.active .line.js::after { width: 85%; }
.progress-bar.active .line.php-mysql::after { width: 80%; }

/* Skills Section */
.skills-category {
    margin-bottom: 4rem;
}

.skills-category h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 700;
}

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

.skill-card {
    background: var(--card-bg);
    padding: 2.8rem 1.8rem;
    border-radius: 24px;
    text-align: center;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    transition: all var(--transition-fast);
}

.skill-card:hover {
    transform: translateY(-12px);
    border-color: var(--primary-color);
    box-shadow: var(--glass-shadow), var(--neon-glow);
    background: rgba(255, 255, 255, 0.06);
}

.skill-card i {
    font-size: 3.2rem;
    color: var(--primary-color);
    margin-bottom: 1.2rem;
    transition: var(--transition-fast);
}

.skill-card:hover i {
    transform: scale(1.15);
}

.skill-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
}

.project-card {
    background: var(--card-bg);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    perspective: 1000px;
}

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

.project-img {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

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

.project-img::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.4));
}

.project-content {
    padding: 2rem;
}

.project-content h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.project-content p {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    height: 4.5rem;
    overflow: hidden;
    line-height: 1.5;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 2rem;
}

.project-tags span {
    background: rgba(0, 210, 255, 0.1);
    color: var(--primary-color);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(0, 210, 255, 0.2);
}

.project-links {
    display: flex;
    justify-content: space-between;
}

.btn-link {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.btn-link:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

/* Roadmap Section */
.roadmap-timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.roadmap-timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background: var(--border-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1.5px;
    border-radius: 10px;
}

.roadmap-item {
    padding: 20px 50px;
    position: relative;
    width: 50%;
}

.roadmap-item:nth-child(odd) { left: 0; text-align: right; }
.roadmap-item:nth-child(even) { left: 50%; }

.roadmap-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background: var(--bg-color);
    border: 4px solid var(--primary-color);
    top: 30px;
    border-radius: 50%;
    z-index: 1;
    box-shadow: var(--neon-glow);
}

.roadmap-item:nth-child(even)::after { left: -10px; }

.roadmap-item.current::after {
    background: var(--primary-color);
    box-shadow: 0 0 20px var(--primary-color);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 210, 255, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(0, 210, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 210, 255, 0); }
}

.roadmap-content {
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    transition: var(--transition-fast);
}

.roadmap-content:hover {
    transform: scale(1.03);
    border-color: var(--primary-color);
}

.roadmap-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    font-weight: 700;
}

/* Contact Section */
.contact-wrapper {
    max-width: 750px;
    margin: 0 auto;
}

.contact-form {
    background: var(--card-bg);
    padding: 4rem;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    box-shadow: var(--glass-shadow);
}

.form-group {
    margin-bottom: 2rem;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 1.2rem 1.8rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    color: var(--text-color);
    outline: none;
    transition: all var(--transition-fast);
    font-size: 1rem;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.1);
}

.contact-form .btn {
    width: 100%;
    justify-content: center;
    font-size: 1.1rem;
    padding: 1.1rem;
}

/* Footer */
.footer {
    padding: 70px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer .logo {
    display: inline-block;
    margin-bottom: 1.5rem;
}

.footer p {
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.footer-social a {
    font-size: 1.4rem;
    color: var(--text-muted);
}

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

.copyright {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 992px) {
    .hero h1 { font-size: 3.8rem; }
    .about-wrapper { grid-template-columns: 1fr; gap: 4rem; }
    .about-img { max-width: 450px; margin: 0 auto; }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 75%;
        background: var(--bg-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -10px 0 30px rgba(0,0,0,0.3);
        z-index: 999;
        backdrop-filter: blur(20px);
    }

    .nav-links.active { right: 0; }
    .hamburger { display: flex; z-index: 1000; }
    
    .hamburger.active span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }

    .hero h1 { font-size: 3rem; }
    .hero h3 { font-size: 1.8rem; }
    
    .roadmap-timeline::after { left: 31px; }
    .roadmap-item { width: 100%; padding-left: 75px; padding-right: 25px; text-align: left; }
    .roadmap-item:nth-child(odd) { text-align: left; }
    .roadmap-item::after { left: 21px; }
    .roadmap-item:nth-child(even)::after { left: 21px; }

    .contact-form { padding: 3rem 2rem; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 2.5rem; }
    .hero-btns { flex-direction: column; width: 100%; }
    .btn { width: 100%; justify-content: center; }
    .section-title { font-size: 2.2rem; }
    .about-img { max-width: 100%; }
}
