:root {
    /* Colors - Dark Premium Theme */
    --bg-color: #0f172a;
    --bg-light: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #38bdf8;
    /* Sky Blue */
    --accent-glow: rgba(56, 189, 248, 0.3);
    --secondary-accent: #818cf8;
    /* Indigo */

    /* Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --container-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: padding 0.3s ease;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--accent-color);
}

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

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

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-accent));
    color: white;
    border: none;
}

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

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px var(--accent-glow);
}

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

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.hero-text {
    flex: 1;
    max-width: 600px;
}

.greeting {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 10px;
    display: block;
}

.hero-text h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(to right, #60a5fa, #c084fc, #f472b6);
    /* More colorful gradient */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 5rem;
    /* Increased size */
    font-weight: 800;
    letter-spacing: -1px;
}

.hero-text h2 {
    font-size: 2rem;
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-weight: 500;
}

.hero-text p {
    color: var(--text-secondary);
    margin-bottom: 35px;
    font-size: 1.1rem;
    max-width: 90%;
}

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

/* Placeholder for Image - to be improved */
.hero-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.blob {
    width: 400px;
    height: 400px;
    background: linear-gradient(45deg, var(--accent-color), var(--secondary-accent));
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: blob-bounce 8s infinite ease-in-out;
    opacity: 0.8;
    filter: blur(40px);
}

@keyframes blob-bounce {
    0% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
        transform: translate(20px, -20px) rotate(10deg);
    }

    66% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
        transform: translate(-20px, 20px) rotate(-10deg);
    }

    100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
        transform: translate(0, 0) rotate(0deg);
    }
}

/* Responsive */
@media (max-width: 968px) {
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
        justify-content: center;
    }

    .hero-text {
        margin-top: 40px;
    }

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

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

    .blob {
        width: 300px;
        height: 300px;
    }

    .hero-text h1 {
        font-size: 3rem;
    }
}

/* Sections Common */
.section {
    padding: 100px 0;
}

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

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
    background: linear-gradient(to right, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

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

.skill-category {
    background: var(--bg-light);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.skill-category h3 {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent-color);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tags span {
    background: rgba(56, 189, 248, 0.1);
    color: var(--text-primary);
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(56, 189, 248, 0.2);
    transition: all 0.3s ease;
}

.skill-tags span:hover {
    background: var(--accent-color);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(56, 189, 248, 0.4);
}

.skill-tags span i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.skill-tags span:hover i {
    transform: rotate(360deg);
    /* Rotate icon on hover */
}

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

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
}

.timeline-item {
    padding-left: 40px;
    margin-bottom: 50px;
    position: relative;
}

.timeline-dot {
    position: absolute;
    left: -9px;
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--accent-color);
    border-radius: 50%;
    border: 4px solid var(--bg-light);
}

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

.timeline-content h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.timeline-content h4 {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 15px;
}

.timeline-content p,
.timeline-content li {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 10px;
}

.timeline-content ul {
    list-style: disc;
    margin-left: 20px;
    margin-top: 10px;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.project-card {
    background: var(--bg-light);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px -15px rgba(0, 0, 0, 0.5);
}

.project-content {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-content h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.project-content p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    flex: 1;
}

.project-tech {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: auto;
}

.project-tech span {
    font-size: 0.8rem;
    color: var(--accent-color);
    background: rgba(56, 189, 248, 0.1);
    padding: 5px 10px;
    border-radius: 5px;
}

.github-link-container {
    text-align: center;
    margin-top: 40px;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--bg-color);
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.service-card:hover {
    transform: translateY(-5px);
    background: #1e293b;
    border-color: var(--accent-color);
}

.service-card .icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 25px;
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.service-card p {
    color: var(--text-secondary);
}

/* Contact Section */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background: var(--bg-light);
    padding: 50px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-info h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

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

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
}

.contact-item i {
    color: var(--accent-color);
    font-size: 1.2rem;
}

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

.social-links a {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

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

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background: var(--bg-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.form-group textarea {
    resize: vertical;
}

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

/* Success Popup */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: var(--bg-light);
    padding: 50px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    border: 1px solid var(--accent-color);
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.popup-overlay.active .popup-content {
    transform: scale(1);
}

.popup-icon {
    font-size: 4rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.popup-content h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.popup-content p {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 15px;
        padding: 10px;
    }

    .nav-links {
        display: flex;
        gap: 20px;
        overflow-x: auto;
        width: 100%;
        padding: 10px 0;
        scrollbar-width: none;
        /* Hide scrollbar Firefox */
        -ms-overflow-style: none;
        /* Hide scrollbar IE/Edge */
        justify-content: flex-start;
        padding-left: 20px;
        padding-right: 20px;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
        /* Hide scrollbar Chrome/Safari */
    }

    .nav-links a {
        white-space: nowrap;
        font-size: 0.9rem;
    }

    .hamburger {
        display: none;
        /* We'll use horizontal scroll instead of menu for better UX */
    }

    /* Scroll Animations */
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: all 0.8s ease;
    }

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

    /* Staggered animation for grid items */
    .skills-grid>div,
    .projects-grid>div,
    .services-grid>div {
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.6s ease;
    }

    .skills-grid>div.active,
    .projects-grid>div.active,
    .services-grid>div.active {
        opacity: 1;
        transform: translateY(0);
    }

    /* Delay for staggered effect could be handled in JS or nth-child here, 
   but simplistic JS loop is better for dynamic content. 
   We will handle the 'active' class addition in JS. */