/* Global Variables & Reset */
:root {
    --bg-color: #050505;
    --text-color: #ffffff;
    --accent-color: #6c5ce7;
    --accent-secondary: #a29bfe;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --container-width: 1200px;
    --spacing-section: 120px;
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: auto;
    /* Handled by Lenis */
}

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

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

ul {
    list-style: none;
}

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

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: var(--spacing-section) 0;
    position: relative;
}

.glass-panel,
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
}

.section-subtitle {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    color: var(--accent-secondary);
    display: block;
    margin-bottom: 12px;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 60px;
    background: linear-gradient(to right, #fff, #aaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}


/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 24px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    transition: padding 0.3s ease, background 0.3s ease;
}

.navbar.scrolled {
    padding: 16px 48px;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
}

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

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

.nav-item {
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0.7;
    position: relative;
}

.nav-item:hover,
.nav-item.active {
    opacity: 1;
    color: var(--accent-secondary);
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition-smooth);
}

.nav-item:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.6;
}

.hero-content {
    text-align: center;
    z-index: 2;
    max-width: 800px;
}

.hero-title {
    font-size: 5rem;
    margin-bottom: 24px;
    line-height: 1.1;
}

.accent-text {
    background: linear-gradient(45deg, #6c5ce7, #a29bfe, #00cec9, #6c5ce7);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradientFlow 5s ease infinite;
    display: inline-block;
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.hero-subtitle {
    font-size: 1.5rem;
    opacity: 0.8;
    margin-bottom: 16px;
}

.hero-description {
    font-size: 1.1rem;
    opacity: 0.6;
    max-width: 600px;
    margin: 0 auto 48px auto;
    font-weight: 300;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.btn {
    padding: 16px 32px;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease;
    font-family: var(--font-body);
}

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

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

.btn-primary:hover {
    background: var(--accent-secondary);
}

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

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

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.7;
}

.mouse {
    width: 26px;
    height: 42px;
    border: 2px solid #fff;
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: #fff;
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollMouse 2s infinite;
}

@keyframes scrollMouse {
    0% {
        top: 6px;
        opacity: 1;
    }

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

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 0.8fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    color: #ccc;
}

.skills-wrapper h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.skill-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    transition: var(--transition-smooth);
    background: rgba(255, 255, 255, 0.03);
    opacity: 1 !important;
    /* Ensure visible check */
}

.skill-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.skill-icon {
    font-size: 2rem;
    color: var(--accent-color);
}

.skill-info h4 {
    font-size: 1rem;
    margin-bottom: 4px;
    color: #fff;
}

.skill-info p {
    font-size: 0.85rem;
    color: #aaa;
    margin: 0;
    line-height: 1.4;
}

.profile-card {
    height: auto;
    /* Remove fixed height to show full image */
    width: 100%;
    max-width: 400px;
    /* Limit width to keep it reasonable */
    margin: 0 auto;
    /* Center it */
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.profile-image {
    width: 100%;
    height: auto;
    /* Maintain aspect ratio */
    display: block;
    border-radius: 12px;
    transition: transform 0.5s ease;
}

.profile-card:hover .profile-image {
    transform: scale(1.02);
}

/* Projects Section */
.projects-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 40px;
    padding-bottom: 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
}

.projects-grid::-webkit-scrollbar {
    display: none !important;
    /* Chrome, Safari, Opera */
}

.project-card {
    cursor: pointer;
    perspective: 1000px;
    flex: 0 0 350px;
    min-width: 350px;
    scroll-snap-align: start;
}

.project-image {
    height: 280px;
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    margin-bottom: 20px;
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
    /* Fast transition for tilt */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.project-card:hover .project-image {
    box-shadow: 0 20px 40px rgba(108, 92, 231, 0.2);
    /* Glow on hover */
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-smooth);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.view-project-btn {
    padding: 12px 24px;
    background: white;
    color: black;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transform: translateY(20px);
    transition: 0.4s ease;
}

.project-card:hover .view-project-btn {
    transform: translateY(0);
}

.project-info h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.project-info p {
    color: #888;
}

.project-links {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    /* Balanced spacing */
    flex-wrap: wrap;
}

.btn-sm {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    /* Very subtle background */
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-sm:hover {
    background: var(--accent-color);
    /* Solid accent on hover */
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

/* Projects Container & Scroll Buttons */
.projects-container {
    position: relative;
    max-width: 100%;
}

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
    opacity: 0;
    /* Initially hidden, JS will handle visibility */
    pointer-events: none;
}

.scroll-btn.visible {
    opacity: 1;
    pointer-events: all;
}

.scroll-btn:hover {
    background: var(--accent-color);
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.scroll-left {
    left: -20px;
}

.scroll-right {
    right: -20px;
}

@media (max-width: 768px) {
    .scroll-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .scroll-left {
        left: 10px;
    }

    .scroll-right {
        right: 10px;
    }
}

/* Experience Section */
.timeline {
    position: relative;
    padding-left: 50px;
}

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

.timeline-item {
    position: relative;
    margin-bottom: 60px;
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: -54px;
    top: 24px;
    width: 10px;
    height: 10px;
    background: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.2);
}

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

.timeline-content {
    padding: 32px;
    transition: transform 0.3s;
}

.timeline-content:hover {
    transform: translateX(10px);
    border-color: rgba(255, 255, 255, 0.3);
}

.timeline-content h3 {
    margin-bottom: 4px;
}

.timeline-content h4 {
    font-weight: 400;
    color: #aaa;
    margin-bottom: 6px;
}

.timeline-meta {
    display: inline-block;
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 16px;
    font-family: var(--font-body);
}

/* Contact Section */
.contact-wrapper {
    padding: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.contact-wrapper p {
    font-family: var(--font-body);
}

.contact-form {
    width: 100%;
    max-width: 500px;
    margin: 40px 0;
    text-align: left;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid #444;
    padding: 10px 0;
    color: white;
    font-size: 1rem;
    font-family: var(--font-body);
    outline: none;
    transition: 0.3s;
}

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

.form-group label {
    position: absolute;
    left: 0;
    top: 10px;
    color: #888;
    transition: 0.3s;
    pointer-events: none;
}

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

.submit-btn {
    width: 100%;
    font-family: var(--font-body);
}

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

.social-icon {
    font-size: 2rem;
    color: #fff;
    opacity: 0.6;
    transition: 0.3s;
}

.social-icon:hover {
    opacity: 1;
    color: var(--accent-secondary);
    transform: scale(1.1);
}

footer {
    text-align: center;
    padding: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: #666;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        scroll-snap-type: x mandatory;
        gap: 16px;
        padding: 0 24px 20px;
    }

    .project-card {
        perspective: none;
        scroll-snap-align: center;
        flex: 0 0 calc(100vw - 48px);
        min-width: calc(100vw - 48px);
    }

    .project-image {
        transform-style: flat;
        transition: none;
    }

    .navbar {
        padding: 20px;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background: rgba(5, 5, 5, 0.98);
        gap: 30px;
        z-index: 99;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-item {
        font-size: 1.5rem;
    }

    .nav-toggle {
        display: block;
        z-index: 100;
    }

    .timeline {
        padding-left: 20px;
    }

    .timeline::before {
        left: 0px;
    }

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

/* Scroll Dots Animation */
.scroll-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-secondary);
    border-radius: 50%;
    opacity: 0.3;
    transition: all 0.3s ease;
    transform: scale(1);
}

.dot.active {
    opacity: 1;
    transform: scale(1.5);
    background-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(108, 92, 231, 0.5);
}