:root {
    --bg-color: #0a0a0a;
    --card-bg: #161616;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-color: #00f2ff;
    /* Cyan */
    --accent-secondary: #7000ff;
    /* Purple */
    --gradient-main: linear-gradient(135deg, var(--accent-color), var(--accent-secondary));
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    /* Global scroll padding for fixed header */
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Cursor Glow Effect */
.cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 242, 255, 0.15), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: -1;
    transition: transform 0.1s ease;
}

/* Header & Nav */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    /* Center the navbar container */
    align-items: center;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    /* Optional: limit max width on large screens */
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.logo .dot {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--accent-color);
}

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

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-primary);
    transition: var(--transition);
}

/* Buttons */
.btn-primary {
    padding: 0.8rem 1.5rem;
    background: var(--gradient-main);
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 242, 255, 0.3);
}

.btn-secondary {
    padding: 0.8rem 1.5rem;
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--accent-color);
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: rgba(0, 242, 255, 0.1);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10%;
    padding-top: 80px;
    /* Header height */
}

.hero-content {
    max-width: 600px;
}

.hero-greeting {
    color: var(--accent-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.hero-name {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, #a0a0a0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Animation Classes */
.hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

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

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

.hero-tagline {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-tagline .highlight {
    color: var(--accent-color);
    font-weight: 600;
}

.hero-btns {
    display: flex;
    gap: 1rem;
}

/* Code Block Visual */
.code-block {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    font-family: 'Fira Code', monospace;
    min-width: 350px;
    position: relative;
}

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

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

.red {
    background: #ff5f56;
}

.yellow {
    background: #ffbd2e;
}

.green {
    background: #27c93f;
}

pre {
    color: #d4d4d4;
    font-size: 0.9rem;
    overflow-x: auto;
}

.language-python {
    color: #9cdcfe;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        padding: 1rem 1.5rem;
        /* Slightly reduced padding */
    }

    .navbar {
        justify-content: flex-start;
        /* Align items to start for mobile */
        gap: 1rem;
    }

    .hamburger {
        display: block;
        margin-left: auto;
        /* Push hamburger to the right */
    }

    /* Adjust Resume Button for Mobile */
    .navbar .btn-primary {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        /* Adjusted for smaller header */

        left: 0;
        width: 100%;
        background: rgba(10, 10, 10, 0.95);
        padding: 2rem;
        text-align: center;
        backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links.active {
        display: flex;
        animation: slideDown 0.3s ease forwards;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .hamburger {
        display: block;
    }

    .hero {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding: 140px 2rem 2rem;
        /* Increased top padding further */
        position: relative;
        z-index: 1;
        /* Ensure it's above background elements */
    }

    .hero-content {
        margin-bottom: 3rem;
        width: 100%;
        position: relative;
        z-index: 2;
        /* Ensure text is visible */
    }

    .hero-name {
        font-size: 2.5rem;
        /* Smaller font for mobile */
    }

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

    .hero-btns {
        justify-content: center;
        flex-direction: column;
        /* Stack buttons on very small screens */
        gap: 1rem;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .code-block {
        display: none;
        /* Hide on small screens for simplicity */
    }

    .section {
        padding: 3rem 1.5rem;
        /* Reduce padding on mobile */
    }

    .section-title {
        font-size: 2rem;
    }
}

/* Section Common Styles */
.section {
    padding: 5rem 10%;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--text-primary);
    position: relative;
    display: block;
    width: fit-content;
    margin: 0 auto 3rem auto;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-main);
    border-radius: 2px;
}

/* About Section */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.about-content p {
    margin-bottom: 1.5rem;
}

.about-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    text-align: center;
}

.skill-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(0, 242, 255, 0.1);
}

.skill-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.skill-card h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.skill-card ul {
    list-style: none;
    text-align: left;
    padding-left: 1rem;
}

.skill-card ul li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
}

.skill-card ul li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent-secondary);
}

/* Experience Section (Timeline) */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-dot {
    width: 20px;
    height: 20px;
    background: var(--bg-color);
    border: 3px solid var(--accent-color);
    border-radius: 50%;
    position: absolute;
    top: 15px;
    right: -10px;
    z-index: 1;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -10px;
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.timeline-content {
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.timeline-content:hover {
    border-color: var(--accent-secondary);
}

.timeline-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

.timeline-content h4 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 400;
}

.timeline-content p {
    font-size: 0.95rem;
    color: #d0d0d0;
}

/* Contact Section */
.contact-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.contact-link {
    font-size: 1.2rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    width: 100%;
    justify-content: center;
}

.contact-link:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* Responsive Timeline */
@media (max-width: 1024px) {
    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
        left: 0 !important;
        position: static !important;
    }

    .timeline-item:nth-child(odd) {
        text-align: left;
    }

    .timeline-item:nth-child(odd) .timeline-dot {
        left: 21px;
        /* Adjusted for new line position */
    }

    .timeline-item:nth-child(even) .timeline-dot {
        left: 21px;
    }

    .timeline-item:nth-child(even) {
        left: 0 !important;
    }
}

/* Blog Styles */
.blog-header {
    text-align: center;
    padding-top: 180px;
    padding-bottom: 2rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.blog-card {
    background: var(--card-bg);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(0, 242, 255, 0.1);
}

.blog-card-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.blog-tag {
    color: var(--accent-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.blog-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.blog-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.blog-title a:hover {
    color: var(--accent-color);
    text-decoration: none;
}

.blog-excerpt {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.read-more {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.read-more:hover {
    gap: 0.8rem;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 4rem;
}

/* Article Page Styles */
.article-container {
    max-width: 800px;
    margin: 0 auto;
    padding-top: 180px;
}

.article-header {
    margin-bottom: 3rem;
    text-align: center;
}

.article-content {
    font-size: 1.1rem;
    color: #d0d0d0;
}

.article-content h2 {
    color: var(--text-primary);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.article-content h3 {
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.article-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content pre {
    background: #1e1e1e;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.article-content code {
    font-family: 'Fira Code', monospace;
    color: #9cdcfe;
}

.article-content img,
.article-content video {
    max-width: 100%;
    border-radius: 8px;
    margin: 2rem 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}