:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --bg-color: #ffffff;
    --bg-alt: #f8fafc;
    --text-color: #0f172a;
    --text-light: #475569;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
    --font-main: 'Poppins', sans-serif;
}

[data-theme="dark"] {
    --primary-color: #3b82f6;
    --primary-dark: #60a5fa;
    --secondary-color: #94a3b8;
    --bg-color: #0f172a;
    --bg-alt: #1e293b;
    --text-color: #f8fafc;
    --text-light: #cbd5e1;
    --card-bg: #1e293b;
    --border-color: #334155;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.18);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    cursor: none; /* Hide default cursor for custom cursor */
}

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary-color);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

body:hover .cursor-outline {
    opacity: 1;
}

/* Utilities */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 100px 0;
}

.bg-alt {
    background-color: var(--bg-alt);
}

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

ul {
    list-style: none;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
}

.btn-outline {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

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

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

[data-theme="dark"] .navbar {
    background-color: rgba(15, 23, 42, 0.8);
}

.navbar.scrolled {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.logo .dot {
    color: var(--primary-color);
    font-size: 2rem;
    line-height: 0;
}

.nav-links {
    display: flex;
    gap: 30px;
}

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

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

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

.theme-toggle {
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-color);
    transition: var(--transition);
}

.theme-toggle:hover {
    color: var(--primary-color);
    transform: rotate(15deg);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger .line {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    padding-bottom: 40px;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 50px;
}

.hero-content .greeting {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    display: block;
    margin-bottom: 10px;
}

.hero-name {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 10px;
}

.hero-title {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

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

.hero-btns {
    display: flex;
    gap: 20px;
}

.hero-visual {
    display: flex;
    justify-content: center;
}

.code-block {
    background-color: #1e293b;
    border-radius: 10px;
    padding: 20px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    transform: rotate(-3deg);
    transition: var(--transition);
}

.code-block:hover {
    transform: rotate(0) scale(1.02);
}

.code-header {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

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

.red { background-color: #ef4444; }
.yellow { background-color: #f59e0b; }
.green { background-color: #10b981; }

.code-content pre {
    color: #e2e8f0;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    overflow-x: auto;
}

.keyword { color: #c084fc; }
.class-name { color: #fbbf24; }
.string { color: #4ade80; }
.function { color: #60a5fa; }
.this { color: #f472b6; }
.return { color: #c084fc; }

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-down a {
    color: var(--text-light);
    font-size: 1.5rem;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* About Section */
.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

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

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--text-light);
}

.interests-container {
    margin-top: 40px;
}

.interests-container h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.interests-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.tag {
    background-color: var(--bg-alt);
    padding: 8px 20px;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-color);
    transition: var(--transition);
}

.tag:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 30px;
}

.skill-card {
    background-color: var(--card-bg);
    padding: 30px 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.skill-card i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.skill-card h3 {
    font-size: 1.1rem;
    font-weight: 500;
}

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

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

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.project-img {
    height: 200px;
    overflow: hidden;
}

.placeholder-img {
    width: 100%;
    height: 100%;
    transition: var(--transition);
}

.color-1 { background: linear-gradient(45deg, #4f46e5, #06b6d4); }
.color-2 { background: linear-gradient(45deg, #db2777, #f59e0b); }
.color-3 { background: linear-gradient(45deg, #10b981, #3b82f6); }

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

.project-info {
    padding: 25px;
}

.project-info h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.project-info p {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

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

.project-tags span {
    font-size: 0.8rem;
    background-color: var(--bg-alt);
    padding: 4px 10px;
    border-radius: 4px;
    color: var(--secondary-color);
}

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

.btn-sm {
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 500;
}

.btn-sm:hover {
    color: var(--primary-color);
}

/* More Projects Notice */
.more-projects-notice {
    text-align: center;
    margin-top: 50px;
    padding: 20px;
    background-color: var(--bg-alt);
    border-radius: 10px;
    border: 1px dashed var(--border-color);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.more-projects-notice p {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.more-projects-notice i {
    color: var(--primary-color);
    animation: swing 2s infinite ease-in-out;
}

@keyframes swing {
    0%, 100% { transform: rotate(-10deg); }
    50% { transform: rotate(10deg); }
}

/* Contact Section */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.contact-info p {
    color: var(--text-light);
    margin-bottom: 30px;
}

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

.contact-item i {
    width: 40px;
    height: 40px;
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.social-links {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

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

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

.contact-form {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.form-group {
    position: relative;
    margin-bottom: 30px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 0;
    font-size: 1rem;
    color: var(--text-color);
    border: none;
    border-bottom: 1px solid var(--border-color);
    outline: none;
    background: transparent;
    transition: var(--transition);
    font-family: var(--font-main);
}

.form-group label {
    position: absolute;
    top: 12px;
    left: 0;
    color: var(--text-light);
    pointer-events: none;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group input:not(:placeholder-shown),
.form-group textarea:not(:placeholder-shown) {
    border-bottom-color: var(--primary-color);
}

.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -20px;
    font-size: 0.85rem;
    color: var(--primary-color);
}

/* Footer */
footer {
    background-color: var(--bg-alt);
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-content p {
    color: var(--text-light);
    margin-bottom: 10px;
}

.footer-content i {
    color: #ef4444;
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }

/* Responsive Design */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }

    .hero-btns {
        justify-content: center;
    }

    .hero-bio {
        margin: 0 auto 30px;
    }

    .code-block {
        margin: 0 auto;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 100%; /* Full width for better mobile experience */
        background-color: var(--card-bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: var(--transition);
        z-index: 999; /* Ensure it's below the hamburger but above content */
    }

    .nav-links.active {
        right: 0;
    }

    .hamburger {
        display: block;
        z-index: 1001;
    }

    .hamburger.active .line:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    .hamburger.active .line:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .line:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    .hero-name {
        font-size: 2.8rem;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 60px 0;
    }
    
    .cursor-dot, .cursor-outline {
        display: none; /* Hide custom cursor on touch devices */
    }
    
    body {
        cursor: auto;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-name {
        font-size: 2rem;
        word-break: break-word;
    }
    
    .hero-title {
        font-size: 1.1rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        width: 100%;
        text-align: center;
    }

    .hero-btns {
        flex-direction: column;
        width: 100%;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .code-content pre {
        font-size: 0.75rem;
    }
    
    .project-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .contact-form {
        padding: 20px;
    }
}
