/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700;900&display=swap');

/* General Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Poppins', sans-serif;
    text-decoration: none;
    list-style: none;
    border: none;
    outline: none;
    cursor: none;
}

:root {
    --text-color: #fff;
    --main-color: #f0f0f0;
    --bg-color-light: #dcdcdc;
    --bg-color-dark: #c0c0c0;
    --btn-bg: #e0e0e0;
    /* --btn-text: #333; */
    --accent-color: #ffbf00;
    --indicator-bg: #fff;
    --indicator-text: #000;
    --fractal-step: 32px;
}

html {
    scroll-behavior: smooth;
    scroll-snap-type: y proximity;
}



body {
    color: var(--text-color);
    overflow-x: hidden;
    overflow-y: hidden;


}


/* Add this to your Placeholder Content Sections */
.content-section, .hero {
    /* This tells each section where to snap */
    scroll-snap-align: start;
}

/* ==================== FRACTAL BACKGROUND STYLES ==================== */
.fractal-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -5;
    filter: blur(5px);
}

.fractal-background video {
    width: 100%;
    height: 100vh;
    /* Changed 'fill' to 'cover' to prevent video distortion */
    object-fit: cover; 
}

.fractal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -3;
    mix-blend-mode: color-dodge;
    filter: blur(.5px);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: repeating-linear-gradient(
      90deg, black, gray var(--fractal-step)
    );
    opacity: 0.5;
}

.fractal::after {
    content: '';
    position: absolute;
    /* Corrected the width and height properties */
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
      90deg, gray, white var(--fractal-step)
    );
    opacity: 0.3;
}

#background-video {
    position: fixed; /* Fixes the video in place */
    right: 0;
    bottom: 0;
    min-width: 100%; 
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -100; /* Pushes the video behind all other content */
    object-fit: cover; /* Ensures the video covers the screen without distortion */
}

/* ==================== PRELOADER STYLES ==================== */
.greetings-container {
    position: fixed;
    inset: 0;
    background-color: #141416; /* A dark background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Highest z-index to cover everything */
    transition: all 1s ease-in-out;
}

#greetings-text {
    font-size: 3rem;
    color: white;
    font-weight: 600;
    transition: opacity 0.3s ease-in-out; /* Smooth fade for text */
}

.greetings-container.hide {
    animation: greetingsRevealUp 1.2s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

.hidden {
    display: none !important;
}

@keyframes greetingsRevealUp {
    0% {
      transform: translateY(0);
      border-radius: 0%;
    }
    100% {
      transform: translateY(-100%);
      border-radius: 0 0 100% 100% / 0 0 50% 50%; /* A smoother curve */
    }
}

/* --- Responsive font size for preloader --- */
@media (max-width: 768px) {
    #greetings-text {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    #greetings-text {
        font-size: 1.5rem;
    }
}


#circle-cursor {
       position: fixed;
       top:0;
       left:0;
       width: 20px;
       height: 20px;
       background-color: rgba(255, 255, 255, 0.6);
       border-radius: 50%;
       pointer-events: none;
       transform: translate(-50%, -50%);
       transition: width 0.15s ease, height 0.15s ease, background-color 0.15s ease;
       z-index: 10000;
}

#circle-cursor.clicked {
       width: 12px;
       height: 12px;
       background-color: rgba(255, 255, 255, 0.9);
}

/* Header & Navbar */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 7%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background-color: transparent;
    transition: background-color 0.3s ease;
}

/* .header.scrolled {
     background-color: rgba(200, 200, 200, 0.8);
     backdrop-filter: blur(5px);
} */

.logo {
    /* font-size: 2.5rem; */
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    display: flex; /* Aligns image and text */
    align-items: center; /* Vertically centers them */
    gap: 0.75rem; /* Adds space between image and text */
    
    padding: 0.5rem 1rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(15px);
    border: 1px solid white solid rgba(255, 255, 255, 0.2);
}

.logo img {
    height: 40px; /* Adjust the size of your logo image */
}

.navbar {
    position: relative;
    /* Crucial for indicator positioning */

    border-radius: 50px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(15px);
    border: 1px solid white;
    padding: 0.7rem 0.5rem;
}



.navbar a {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--btn-text);
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    /* margin-left: 1rem; */
    transition: color 0.4s ease;
    z-index: 1;
    position: relative;
}

.navbar a.active {
    color: var(--indicator-text);
    /* Active text is white */
}

.navbar .indicator {
    position: absolute;
    top: 5%;
    left: 0;
    height: 90%;
    background-color: var(--indicator-bg);
    border-radius: 2rem;
    z-index: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

#menu-icon {
    font-size: 2.5rem;
    color: var(--text-color);
    display: none;
}

/* Hero Section (Home) */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 7% 2rem;
    gap: 7rem;
}

.hero-content {
    max-width: 50%;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
}

.hero-content .intro-text {
    font-size: 2.5rem;
    font-weight: 400;
    line-height: 1;
}

.hero-content h1 {
    font-size: 5.5rem;
    font-weight: 600;
    line-height: 1.1;
    margin: -0.5rem 0 1.5rem;
}

.hero-content .description {
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 2rem;
    background-color: var(--btn-bg);
    color: var(--btn-text);
    border-radius: 2rem;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;


    background-color: rgba(255, 255, 255, 0.9);
    color: #000;
    box-shadow: 0 0 0px black;
    transition: background-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.btn i {
    font-size: 1.2rem;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);

    background-color: #fff;
    box-shadow: 0 0 15px black;
}

.hero-image {
    max-width: 450px;
}

.hero-image img {
    width: 100%;
    height: auto;
    filter: drop-shadow(10px 10px 20px rgba(0, 0, 0, 0.3));
}

/* Placeholder Content Sections */
.content-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0rem 7%;
    text-align: center;
}

.content-section h2 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
}

.content-section h2 span {
    color: var(--accent-color);
}

.content-section p {
    font-size: 1.2rem;
    max-width: 600px;
}

/* ==================== PROJECTS SECTION STYLES ==================== */
#projects {
    padding-top: 5rem;
    padding-bottom: 5rem;
    
}

.slider-wrapper {
    position: relative;
    max-width: 1200px;
    width: 95%;
    margin: 2rem auto 0;
    padding: 2rem;
    border-radius: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
}

.project-list {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% / 3) - 12px);
    gap: 1.2rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    /* Hide scrollbar for Firefox */
    -ms-overflow-style: none;
    /* Hide scrollbar for IE/Edge */
    scroll-behavior: smooth;
}

.project-list::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar for Chrome/Safari */
}

.project-card {
    scroll-snap-align: start;
    background: #fff;
    color: #333;
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: top center;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #eee;
    background-color: #f0f0f0;
}

.card-title {
    /* font-size: 1.5rem; */
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card-description {
    font-size: 0.5rem;
    line-height: 1.5;
    flex-grow: 1;
    /* Pushes button to the bottom */
    margin-bottom: 1.5rem;
}

.card-button {
    align-self: flex-start;
    background-color: #7b68ee;
    /* A nice purple color */
    color: #fff;
    padding: 0.6rem 1.5rem;
    border-radius: 2rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.card-button:hover {
    background-color: #5a4fcf;
}

.slide-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 46px;
    width: 46px;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    border-radius: 50%;
    color: #333;
    font-size: 2.2rem;
    /* cursor: pointer; */
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-button:hover {
    background-color: #fff;
}

#prev-slide {
    left: -60px;
}

#next-slide {
    right: -60px;
}

.slider-scrollbar {
    margin-top: 1.5rem;
    height: 24px;
    width: 100%;
    display: flex;
    align-items: center;
}

.scrollbar-track {
    height: 4px;
    width: 100%;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    position: relative;
}

.scrollbar-thumb {
    position: absolute;
    height: 100%;
    width: 50%;
    /* JS will calculate this */
    background: #fff;
    border-radius: inherit;
    /* cursor: grab; */
}

/* .scrollbar-thumb:active {
    cursor: grabbing;
} */


/* ==================== SKILLS SECTION STYLES ==================== */
#skills {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.skills-container {
    max-width: 1200px;
    width: 95%;
    margin: 2rem auto 0;
    padding: 2.5rem;
    border-radius: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 1rem;
    padding: 1rem;
    flex: 0 0 110px; /* Sets a consistent size for each item */
    aspect-ratio: 1 / 1;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.skill-item:hover {
    transform: scale(1.1) translateY(-5px);
    background: rgba(255, 255, 255, 0.25);
}

.skill-item i {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
}

.skill-item p {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
    text-align: center;
}

@media (max-width: 767px) {
    #circle-cursor {
        display:none;
    }
}

/* --- Skills Section Responsive --- */
@media (max-width: 768px) {
    .skills-container {
        padding: 2rem 1.5rem;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 1rem;
    }

    .skill-item i {
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- Project Section Responsive --- */
@media (max-width: 992px) {
    .project-list {
        grid-auto-columns: calc((100% / 2) - 9px);
    }
}

@media (max-width: 768px) {
    .slider-wrapper {
        padding: 1rem;
    }

    .project-list {
        grid-auto-columns: 100%;
    }

    .slide-button {
        display: none;
        /* Hide arrows on mobile, rely on swipe */
    }
}

/* --- Responsive Design --- */
@media (max-width: 1200px) {
    html {
        font-size: 95%;
    }

    .hero-content h1 {
        font-size: 5rem;
    }
}

@media (max-width: 992px) {
    .header {
        padding: 1.5rem 5%;
    }

    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 10rem;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-content h1 {
        font-size: 4.5rem;
    }

    .hero-image {
        max-width: 350px;
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    #menu-icon {
        display: block;
        /* cursor: pointer; */
    }

    .navbar {
        position: absolute;
        top: 100%;
        left: -100%;
        /* Start off-screen */
        width: 100%;
        padding: 1rem 5%;
        background-color: rgba(200, 200, 200, 0.9);
        backdrop-filter: blur(5px);
        transition: left 0.4s ease;
    }

    .navbar.active {
        left: 0;
        /* Slide in */
    }

    .navbar a {
        display: block;
        margin: 1.5rem 0;
        text-align: center;
        color: var(--btn-text);
    }

    .navbar .indicator {
        display: none;
        /* Hide indicator on mobile */
    }
}

@media (max-width: 480px) {
    html {
        font-size: 85%;
    }

    .hero-content h1 {
        font-size: 3.8rem;
    }

    .hero-content .intro-text {
        font-size: 2rem;
    }

    .content-section h2 {
        font-size: 3rem;
    }
}

@media (max-width: 360px) {
    .hero-content h1 {
        font-size: 3.2rem;
    }
}


/* ==================== CONTACT SECTION STYLES ==================== */
#contact {
    padding-top: 5rem;
    /* padding-bottom: 5rem; */
}

#contact h2 {
    font-size: 3.5rem;
    margin-bottom: 2rem;
    /* Adjusted margin for the form container */
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
}

.contact-form-container {
    max-width: 600px;
    width: 90%;
    margin: 0 auto;
    padding: 2.5rem;
    margin-bottom: .5rem;
    border-radius: 2rem;
    /* background: rgba(0, 0, 0, 0.6); */
    background: rgba(150, 150, 150, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    /* Darker background for contrast */
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    text-align: center;
}

.contact-form h3 {
    font-size: 2.2rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.contact-form p {
    font-size: 1rem;
    color: #bbb;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.input-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    color: var(--text-color);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.input-group input::placeholder,
.input-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.input-group input:focus,
.input-group textarea:focus {
    border-color: var(--accent-color);
}

textarea {
    resize: vertical;
    /* Allow vertical resizing */
    min-height: 100px;
}

.send-btn {
    display: block;
    width: 100%;
    padding: 1rem 1.5rem;
    background-color: #007bff;
    /* Blue for the send button */
    color: #fff;
    border-radius: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    /* cursor: pointer; */
    margin-top: 1rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.send-btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.social-separator {
    width: 80%;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.3);
    margin: 2.5rem auto 1.5rem;
    /* Space above and below separator */
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-links a {
    font-size: 3rem;
    /* Size of social icons */
    color: var(--text-color);
    /* Default color for icons */
    transition: transform 0.3s ease, color 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-5px);
    color: var(--accent-color);
    /* Accent color on hover */
}

/* ==================== FOOTER STYLES ==================== */
.footer {
    padding: 1.5rem 7%;
    text-align: center;
    /* background-color: rgba(0, 0, 0, 0.5); */
    background: rgba(100, 100, 100, 0.5);
    color: #eee;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- Contact Section Responsive --- */
@media (max-width: 768px) {
    .contact-form-container {
        padding: 2rem;
    }

    .contact-form h3 {
        font-size: 1.8rem;
    }

    .social-links a {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    #contact h2 {
        font-size: 2.5rem;
    }

    .contact-form-container {
        padding: 1.5rem;
        width: 95%;
        /* Wider on smaller screens */
    }

    .social-links {
        gap: 1rem;
    }
}

/* ==================== DARK MODE TOGGLE STYLES ==================== */
#dark-mode-toggle {
    font-size: 1.5rem; /* Icon size */
    color: var(--text-color);
    margin-left: 1.5rem; /* Space between navbar and button */
    padding: 0.7rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: background-color 0.3s, color 0.3s;
}

/* --- Dark Theme Variables --- */
body.dark-mode {
    --text-color: #0d0d0d;
    --text-color: #fff;
    --indicator-bg: #1f1f1f;
    --indicator-text: #fff;
}

/* --- Component-Specific Dark Mode Styles --- */
body.dark-mode .logo,
body.dark-mode .navbar,
body.dark-mode #dark-mode-toggle {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: #fff; /* Ensure icon and text are white */
}

body.dark-mode .navbar a {
    color: #efefef; /* Lighter text for nav links in dark mode */
}

body.dark-mode .project-card {
    background: #2a2a2a; /* Darker card background */
    color: #f0f0f0; /* Lighter text for cards */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

body.dark-mode .skills-container,
body.dark-mode .slider-wrapper,
body.dark-mode .contact-form-container {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .fractal {
    mix-blend-mode: color-burn; /* A different blend mode for dark theme */
    opacity: 0.4;
}

/* ==================== SCROLL-TO-TOP BUTTON ==================== */
#scroll-to-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 99;
    
    /* Styling */
    font-size: 1.8rem;
    color: #000;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.2);

    /* Animation: Initially hidden */
    opacity: 0;
    transform: translateY(15px);
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Animation: Becomes visible when active */
#scroll-to-top-btn.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}