:root {
    --bg-color: #0a0a0a;
    --text-color: #e0e0e0;
    --text-muted: #a0a0a0;
    --primary-color: #6c5ce7;
    --secondary-color: #00cec9;
    --accent-color: #fdcb6e;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition-speed: 0.3s;
}

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

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

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 15% 50%, rgba(108, 92, 231, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(0, 206, 201, 0.15), transparent 25%);
    filter: blur(80px);
    /* Reduced blur for performance */
    animation: bg-pulse 10s ease-in-out infinite alternate;
}

@keyframes bg-pulse {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
    }
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: padding 0.3s ease;
}

.scrolled .navbar {
    padding: 1rem 5%;
    background: rgba(10, 10, 10, 0.95);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: -0.5px;
}

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

.nav-links li a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: color var(--transition-speed);
    position: relative;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width var(--transition-speed);
}

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

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

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

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: 0.3s;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 0 20px;
}

.profile-img-container {
    margin-bottom: 2rem;
    animation: fade-up 1s ease-out;
}

.profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.4);
    transition: transform 0.3s;
}

.profile-img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(108, 92, 231, 0.6);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff 0%, #b3b3b3 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
    animation: fade-up 1s ease-out 0.2s backwards;
}

/* Glitch removed */

.subtitle {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.4;
    animation: fade-up 1s ease-out 0.4s backwards;
}

.tagline {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    animation: fade-up 1s ease-out 0.6s backwards;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    animation: fade-up 1s ease-out 0.8s backwards;
}

.btn {
    text-decoration: none;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all var(--transition-speed);
}

.primary-btn {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.6);
}

.secondary-btn {
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--card-border);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-color);
}

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

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--text-muted);
    border-radius: 20px;
    position: relative;
}

.mouse::before {
    content: '';
    width: 4px;
    height: 8px;
    background: var(--text-muted);
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
    animation: scroll 1.5s infinite;
}

/* Sections General */
.section {
    padding: 6rem 10%;
    min-height: 50vh;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 4rem;
    text-align: center;
    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: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

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

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background: var(--card-border);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    margin-bottom: 30px;
    opacity: 0;
    /* For animation */
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

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

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

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

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

.timeline-date {
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.timeline-content {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    backdrop-filter: blur(5px);
    transition: transform 0.3s;
}

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

.badge {
    display: inline-block;
    background: rgba(253, 203, 110, 0.2);
    color: var(--accent-color);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.current .timeline-content {
    border: 1px solid var(--secondary-color);
    box-shadow: 0 0 15px rgba(0, 206, 201, 0.1);
}

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

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

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

.card-content h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.project-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tags span {
    background: rgba(108, 92, 231, 0.2);
    color: #a29bfe;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* Work & Skills Layout */
.two-column-layout {
    display: flex;
    gap: 4rem;
    flex-wrap: wrap;
}

.work-column,
.skills-column {
    flex: 1;
    min-width: 300px;
}

.service-list {
    list-style: none;
}

.service-list li {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    transition: 0.3s;
}

.service-list li:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(10px);
}

.service-list i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 5px;
}

.skill-bar {
    margin-bottom: 1.5rem;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.progress-line {
    height: 8px;
    width: 100%;
    background: #333;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.progress-line span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1s cubic-bezier(0.1, 0.5, 0.5, 1);
}

.progress-line.animate span {
    transform: scaleX(1);
}

.click-hint {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--secondary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.8;
    transition: 0.3s;
}

.project-card:hover .click-hint {
    opacity: 1;
    transform: translateX(5px);
    text-decoration: underline;
}

/* Contact */
.contact-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-card {
    text-decoration: none;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    width: 250px;
    transition: 0.3s;
    color: var(--text-color);
}

.contact-card:hover {
    background: var(--primary-color);
    transform: translateY(-5px);
    border-color: var(--primary-color);
    color: #fff;
}

.contact-card i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
    transition: 0.3s;
}

.contact-card:hover i {
    color: #fff;
}

footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--card-border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Animations Keyframes */
@keyframes fade-up {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scroll {
    0% {
        opacity: 1;
        top: 8px;
    }

    100% {
        opacity: 0;
        top: 24px;
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .section {
        padding: 4rem 5%;
        /* Reduced padding */
    }

    .hero-title {
        font-size: 2.8rem;
        /* Smaller title */
        line-height: 1.2;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .profile-img {
        width: 120px;
        height: 120px;
    }

    /* Timeline Mobile Adjustments */
    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 15px;
        /* Reduced right padding */
        margin-bottom: 20px;
    }

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

    .timeline-item::after {
        left: 21px;
    }

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

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

    /* Navigation Mobile */
    .nav-links {
        position: fixed;
        /* Fixed to cover screen correctly */
        right: 0;
        height: 100vh;
        top: 0;
        background-color: rgba(10, 10, 10, 0.98);
        /* Solid background */
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        /* Center items vertically */
        width: 100%;
        /* Full width */
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        z-index: 999;
        /* Below hamburger */
    }

    .nav-links li {
        margin: 1.5rem 0;
        opacity: 0;
        /* For animation */
    }

    .nav-links.nav-active {
        transform: translateX(0%);
    }

    .hamburger {
        display: flex;
        z-index: 1001;
        /* Above menu */
    }

    /* Project Grid & Work Layout */
    .projects-grid {
        grid-template-columns: 1fr;
        /* Single column */
        gap: 1.5rem;
    }

    .card-content {
        padding: 1.5rem;
    }

    .two-column-layout {
        flex-direction: column;
        gap: 2rem;
    }

    /* Work & Services - Compact Grid */
    .service-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        /* Two columns */
        gap: 1rem;
    }

    .service-list li {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-bottom: 0;
        /* Remove bottom margin */
        padding: 1rem;
        height: 100%;
        gap: 0.5rem;
    }

    .service-list i {
        font-size: 1.8rem;
        margin-top: 0;
        margin-bottom: 0.5rem;
    }

    .service-list h3 {
        font-size: 0.95rem;
        margin-bottom: 0.3rem;
    }

    .service-list p {
        font-size: 0.8rem;
        line-height: 1.3;
    }

    /* Contact Mobile - Side by Side */
    .contact-container {
        gap: 1rem;
        flex-direction: row;
        /* Force row */
        flex-wrap: wrap;
    }

    .contact-card {
        width: calc(50% - 0.5rem);
        /* Two per row */
        padding: 1.5rem 1rem;
        min-width: auto;
        /* Override any min-width */
    }

    .contact-card i {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }

    .contact-card h3 {
        font-size: 1rem;
    }

    .contact-card p {
        font-size: 0.8rem;
        word-break: break-all;
        /* Prevent overflow */
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .timeline-content {
        padding: 15px;
    }

    /* Ensure side-by-side persists on small screens but maybe adjust padding */
    .contact-card {
        padding: 1rem 0.5rem;
    }
}