/* Global Styles */
:root {
    --primary-color: #007bff;
    --primary-light: #00d4ff;
    --gradient: linear-gradient(135deg, #007bff, #00d4ff);
    --secondary-color: #6c757d;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #e0e0e0;
    background: #141414;
    overflow-y: scroll; /* Ensure scrollbar is always present */
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.main-header {
    background: transparent;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.main-header.scrolled {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.main-header .container {
    max-width: 100%;
    position: relative;
    text-align: center;
    padding: 1rem 20px;
}

.logo {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    font-weight: bold;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    letter-spacing: 2px;
}

.main-nav {
    display: inline-block;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav ul li {
    display: inline-block;
    margin: 0 15px;
}

.main-nav a {
    text-decoration: none;
    color: #fff; /* Changed to white for transparent header */
    font-weight: 500;
    transition: color 0.3s ease;
}

.main-header.scrolled .main-nav a {
    color: #fff; /* Change back to dark on scroll */
}

.main-nav a:hover {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hero Section */
#hero {
    position: relative;
    height: 100vh;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    text-align: left;
    color: #fff;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(to bottom, transparent, #141414);
    z-index: 0;
    pointer-events: none;
}

#hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -2;
    transform: translateX(-50%) translateY(-50%);
    background-size: cover;
}

/* Video Fallback / Loading State */
.video-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a0a 0%, #141414 50%, #0a0a0a 100%);
    z-index: -3;
    transition: opacity 0.5s ease;
}

.bg-video {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.bg-video.loaded {
    opacity: 1;
}

#hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: -1;
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    margin: 0;
    padding: 0 5%;
    box-sizing: border-box;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-greeting {
    font-family: 'Roboto', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: bold;
    margin-bottom: 1rem;
}

.hero-description {
    font-family: 'Roboto', sans-serif;
    font-size: clamp(1rem, 2vw, 1.4rem);
    line-height: 1.7;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    z-index: 1;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.scroll-indicator:hover {
    opacity: 1;
}

.scroll-mouse {
    width: 24px;
    height: 38px;
    border: 2px solid #fff;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.scroll-wheel {
    width: 3px;
    height: 8px;
    background: #fff;
    border-radius: 2px;
    animation: scrollBounce 1.5s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% {
        transform: translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateY(10px);
        opacity: 0.3;
    }
}

.scroll-text {
    color: #fff;
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Content Sections */
main {
    scroll-snap-type: y proximity;
}

main > section {
    scroll-snap-align: start;
}

.content-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 0;
}

.content-section h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
    color: #fff;
}

#projects.content-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 120px;
    padding-bottom: 160px;
    box-sizing: border-box;
}

.about-me-container {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.about-me-image {
    flex: 1;
}

.about-me-image img {
    max-width: 300px;
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.about-me-text {
    flex: 2;
}

.about-me-text p {
    font-size: 1.1rem;
}

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

/* Footer */
.main-footer {
    background: #000;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    padding: 1rem 0;
    font-size: 0.85rem;
}

.main-footer p {
    margin: 0;
}

/* Custom Animation Styles */
[data-sal] {
    transition: all 0.5s ease-out;
}

[data-sal="slide-up"] {
    opacity: 0;
    transform: translateY(20px);
}

[data-sal="slide-up"].is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Skills Section */
#projects {
    position: relative;
    color: #fff;
}

#projects::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(to bottom, rgba(20,20,20,1) 0%, transparent 8%),
        linear-gradient(to top, rgba(20,20,20,1) 0%, transparent 8%),
        rgba(0,0,0,0.5);
    z-index: -1;
    pointer-events: none;
}



#projects-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

#projects .container {
    position: relative;
    z-index: 1;
    width: 90%;
    max-width: 1600px;
}

.skills-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    align-items: flex-start;
    width: 100%;
}

#skills {
    background-color: #141414;
    color: #e0e0e0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

#skills .container {
    position: relative;
    z-index: 1;
    width: 90%;
    max-width: 1600px;
    margin: 0 auto;
}

.skill-item {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #e0e0e0;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: fit-content;
}

.skill-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-light);
}

.skill-header {
    padding: 1.1rem 1rem 0.6rem;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-light);
}

.sub-skills {
    list-style: none;
    padding: 0 1rem 1.1rem;
    margin: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}

.sub-skills li {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.55);
    background: transparent;
    border: none;
    padding: 2px 0;
    box-shadow: none;
    font-weight: 400;
    text-align: center;
    line-height: 1.4;
}

.sub-skills li:hover {
    color: var(--primary-light);
}

.skill-item {
    cursor: default;
}

@media (max-width: 1250px) {
    .skills-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.2rem;
    }
}

@media (max-width: 900px) {
    .skills-list {
        grid-template-columns: repeat(2, 1fr);
    }
    #skills {
        height: auto;
        min-height: 100vh;
        padding: 100px 0;
    }
}

@media (max-width: 600px) {
    .skills-list {
        grid-template-columns: 1fr;
    }
}

/* Projects Section */
#projects h2 {
    color: #fff;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    width: 100%;
}

.project-card {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    text-align: left;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-light);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.1);
}

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

.project-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.project-details p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    color: #ccc;
}

.project-technologies {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-technologies span {
    background: rgba(0, 123, 255, 0.12);
    color: var(--primary-light);
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    border: 1px solid rgba(0, 212, 255, 0.2);
}



/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 40px;
    border: 1px solid #888;
    width: 80%;
    max-width: 800px;
    border-radius: 10px;
    position: relative;
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}




#about {
    background-color: #141414;
    color: #e0e0e0;
    height: 100vh;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

#skills .container,
#about .container,
.contact-section .container {
    width: 90%;
    max-width: 1600px;
    text-align: center;
}

#about .container {
    text-align: left;
}

#about h2 {
    text-align: left;
}

/* Contact Section */
.contact-section {
    position: relative;
    height: 100vh;
    color: #fff;
    overflow: hidden;
}

.contact-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(to bottom, rgba(20,20,20,1) 0%, transparent 15%),
        rgba(0,0,0,0.5);
    z-index: -1;
    pointer-events: none;
}

#contact-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.contact-section .container {
    position: relative;
    z-index: 1;
}

.contact-section h2 {
    color: #fff;
    text-align: center;
    margin-bottom: 0.5rem;
}

.contact-subtitle {
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-card:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-light);
    transform: translateY(-3px);
}

.contact-icon {
    height: 24px;
    width: 24px;
    filter: invert(1);
}

/* Language Toggle */
.lang-toggle {
    position: absolute;
    right: 80px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 4px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
}

.lang-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--primary-light);
}

.lang-label {
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Motion Toggle */
.motion-toggle {
    position: absolute;
    right: 136px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 4px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
    color: #fff;
    display: flex;
    align-items: center;
}

.motion-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--primary-light);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
}

.hamburger-line {
    display: block;
    width: 25px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.menu-open .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

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

.hamburger.menu-open .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Responsive Design */
@media (max-width: 768px) {
    .lang-toggle {
        right: 60px;
        padding: 3px 10px;
    }

    .motion-toggle {
        right: 100px;
    }

    .hamburger {
        display: flex;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        padding: 1rem 0;
    }

    .main-nav.menu-open {
        display: block;
    }

    .main-nav ul {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .main-nav ul li {
        display: block;
        margin: 0;
        padding: 0.75rem 0;
        width: 100%;
        text-align: center;
    }

    .main-nav ul li:hover {
        background: rgba(255, 255, 255, 0.05);
    }

    .hero-content h1 {
        font-size: 2rem;
    }

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

    .about-me-container {
        flex-direction: column;
    }
}

.project-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Dot Navigation */
.dot-nav {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 18px;
    z-index: 999;
}

.dot-link {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.dot-link:hover .dot {
    background: rgba(255, 255, 255, 0.7);
}

.dot-link.active .dot {
    background: var(--primary-light);
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
    transform: scale(1.3);
}

.dot-label {
    position: absolute;
    right: 22px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(5px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.dot-link:hover .dot-label {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 768px) {
    .dot-nav {
        display: none;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce),
.reduced-motion {
    .bg-video {
        display: none;
    }

    [data-sal] {
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    html {
        scroll-behavior: auto;
    }

    main {
        scroll-snap-type: none;
    }

    .scroll-wheel {
        animation: none;
    }
}
