@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: 'Poppins', sans-serif;
}

html {
    font-size: 60%;
    overflow-x: hidden;
}

:root {
    --bg-color: #0e0e0e;
    --second-bg-color: #161616;
    --text-color: #e0e0e0;
    --main-color: #ffffff;
    --seconed-color: #888888;
    --white-color: #ffffff;
}
body {
    background: var(--bg-color);
    color: var(--text-color);
}


/* -----Header----- */

.header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    padding: 4rem 12%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}
#menu-icon {
    font-size: 3.6rem;
    color: var(--main-color);
    display: none;
}
.logo {
    font-size: 3rem;
    color: var(--text-color);
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s ease;
}
.logo:hover {
    transform: scale(1.05);
}

/* Standard span color for highlights, excluding buttons */
span:not(.btn span) {
    color: var(--main-color);
}
.navbar a {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-left: 4rem;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.navbar a::before {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--main-color);
    transition: width 0.3s ease;
}

.navbar a:hover,
.navbar a.active {
    color: var(--main-color);
}

.navbar a:hover::before,
.navbar a.active::before {
    width: 100%;
}
section {
    min-height: 100vh;
    padding: 10rem 12%;
}
.home {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15rem;
    position: relative; /* Fix stacking context */
    z-index: 1;
}
.home-content {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}
.home-content h1 {
    font-size: 6rem;
    font-weight: 700;
    margin: 1.5rem;
    line-height: 1;
}
.home-content h3 {
    font-size: 4rem;
    margin: 1rem 0;
}
.home-content p {
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.8;
}
.home-img img{
    width: 32vw;
    border-radius: 50%;
    /* box-shadow removed for modern look */
    border: 2px solid var(--text-color);
    transition: 0.4s ease-in-out;
}
.home-img img:hover {
    /* box-shadow removed */
    transform: scale(1.02);
    border-color: var(--main-color);
}
.social-icons a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 3rem;
    padding: 1rem;
    background: transparent;
    border: 2px solid var(--main-color);
    border-radius: 50%;
    color: var(--main-color);
    margin: 3rem 0.5rem;
    position: relative;
    overflow: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.social-icons a i {
    position: relative;
    z-index: 1;
    color: inherit;
    transition: transform 0.3s ease, color 0.3s ease;
}

.social-icons a:hover {
    color: var(--bg-color);
    background-color: var(--main-color);
    border-color: var(--main-color);
}
.btn-group {
    display: flex;
    gap: 1.5rem;
}
.btn {
    display: inline-block;
    padding: 1rem 3rem;
    background: var(--bg-color);
    border-radius: 3rem;
    font-size: 1.8rem;
    color: var(--main-color);
    border: 2px solid var(--main-color);
    font-weight: 600;
    position: relative;
    overflow: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    text-align: center;
}

.btn span {
    position: relative;
    z-index: 1;
    display: inline-block;
    color: inherit;
    transition: transform 0.3s ease, color 0.3s ease;
}

.btn:hover {
    background-color: var(--main-color);
    color: var(--bg-color);
}

.btn-group a:nth-of-type(2) {
    background-color: transparent;
    color: var(--main-color);
}

.btn-group a:nth-of-type(2):hover {
    background-color: var(--main-color);
    color: var(--bg-color);
}

/* -----About Me----- */
.about {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10rem;
    background-color: var(--second-bg-color);
    position: relative; /* Fix stacking context */
    z-index: 1;
}
.about-img img {
    width: 32vw;
    border-radius: 50%;
    /* box-shadow removed */
    border: 2px solid var(--text-color);
    transition: 0.4s ease-in-out;
}
.about-img img:hover {
    /* box-shadow removed */
    transform: scale(1.02);
    border-color: var(--main-color);
}
.about-content h2 {
    font-size: 7rem;
    text-align: left;
}
.about-content p {
    font-size: 1.8rem;
}
.about-content .btn {
    margin: 3rem 0;
}

::-webkit-scrollbar {
    display: none;
}
html {
    scrollbar-width: none;
}


/* -----Learn----- */

.heading {
    text-align: center;
    font-size: 7rem;
    margin: 5rem 0;
}
.learn {
    background-color: var(--bg-color);
    color: var(--text-color);
    position: relative; /* Fix stacking context */
    z-index: 1;
}
.learn h2 {
    color: var(--text-color);
}
.learn-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    align-items: center;
    gap: 2.5rem;
}
.learn-box {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--main-color);
    height: 600px;
    border-radius: 3rem;
    cursor: pointer;
    border: 2px solid transparent; /* Default border is transparent */
    transition: color 0.4s ease-in-out, background-color 0.4s ease-in-out, border 0.4s ease-in-out;
    color: white; /* Default text color is white */
}
.learn-box:hover {
    background-color: var(--second-bg-color); /* Background changes to gray */
    color: var(--seconed-color); /* Text fades to gray */
    border: 2px solid var(--main-color); /* Add a border on hover */
}
.learn-info {
    display: flex;
    flex-direction: column;
    text-align: center;
    justify-content: center;
    align-items: center;
    padding-inline: 5rem;
}
.learn-info i {
    font-size: 8rem;
}
.learn-info h4 {
    font-size: 4rem;
    margin: 2rem 0;
    font-weight: 800;
}
.learn-info p {
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.7;
}
.learn-video-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 32px;
}
.learn-video-title {
    color: var(--text-color, #fff);
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 16px;
    text-align: center;
}
.learn-video-container {
    width: 100%;
    max-width: 960px;
    display: flex;
    justify-content: center;
}
.learn-video-container iframe {
    width: 100%;
    height: 400px;
    border-radius: 13px;
    /* box-shadow replaced with border */
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #222;
}


/* Footer */

.footer {
    background-color: var(--bg-color);
    padding: 50px 0;
}
.footer .social-icons {
    text-align: center;
}
.footer ul {
    text-align: center;
    font-size: 1.8rem;
}
.footer ul li {
    display: inline-block;
    margin-left: 20px;
}
.footer ul li a {
    color: white;
    border-bottom: 3px solid transparent;
    transition: 0.3s ease-in-out;
}
.footer ul li a:hover {
    color: var(--main-color);
    border-bottom: 3px solid var(--main-color);
}
.footer .copyright {
    text-align: center;
    margin-top: 40px;
    font-size: 16px;
}


/* Modal */

.modal {
    display: none;  /* Keep only this display property */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    animation: fadeIn 0.3s;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}
.modal-content {
    background-color: var(--bg-color);
    margin: auto;
    padding: clamp(20px, 4vw, 40px);
    border: 3px solid var(--main-color);
    width: fit-content;
    min-width: 280px;
    max-width: 90%;
    border-radius: 15px;
    color: var(--text-color);
    font-size: clamp(1.2rem, 3vw, 2.3rem);
    transition: transform 0.3s;
    overflow-y: auto;
    max-height: 85vh;
    height: auto;
}

.modal-content:hover {
    transform: scale(1.02);
    box-shadow: 0 0 20px var(--main-color);
}

.close {
    color: var(--main-color);
    float: right;
    font-size: clamp(25px, 4vw, 35px);
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    padding: 10px;
}

.close:hover {
    color: var(--main-color); /* Keep the close button black on hover */
    transform: rotate(90deg);
}

.body-no-scroll {
    overflow: hidden;
}

.underlign {
    position: relative;
    display: inline-block;
    color: var(--main-color);
    transition: color 0.3s ease, transform 0.3s ease; /* Add smooth transition for rise-up effect */
}
.underlign::before {
    content: '';
    position: absolute;
    width: 100%; /* Always show the underline */
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--main-color);
    transition: width 0.3s ease;
}

.underlign:hover {
    transform: translateY(-3px); /* Make the text rise up slightly */
    color: var(--main-color); /* Keep the text color consistent */
}

/* Make Website Responsive to different sizes */
@media(max-width:1024px) {
    #menu-icon {
        display: block;
        transition: transform 0.2s ease-in-out;
    }
    
    #menu-icon.bx-x {
        transform: rotate(45deg);
    }
    .navbar {
        position: absolute;
        top: 100%;
        right: 0;
        width: 50%;
        padding: 1rem 3rem;
        background-color: rgba(0, 0, 0, 0.8);
        border-left: 2px solid var(--main-color);
        border-bottom: 2px solid var(--main-color);
        border-top: 2px solid var(--main-color);
        border-bottom-left-radius: 2rem;
        border-top-left-radius: 2rem;
        transform: translateX(100%);
        transition: transform 0.2s ease-in-out;
    }
    .navbar.active {
        transform: translateX(0);
    }
    .navbar a {
        display: block;
        font-size: 2rem;
        margin: 3rem 0;
        color: var(--text-color);
    }
    .navbar.active {
        display: block;
    }
    .home {
        flex-direction: column-reverse;
        margin: 5rem 0;
        gap: 5rem;
    }
    .home-content {
        align-items: center;
        text-align: center;
    }
    .home-img img {
        width: 52vw;
    }
    .about {
        flex-direction: column-reverse;
        text-align: center;
    }
    .about h2 {
        text-align: center;
        margin: 2rem 0;
    }
    .about img {
        width: 52vw;
    }
    .about-content {
        text-align: center;
    }
    
}

/* -----Custom Cursor----- */
.cursor {
    position: fixed;
    width: 12px;
    height: 12px;
    background: var(--main-color);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
    transform: translate(-50%, -50%);
    mix-blend-mode: exclusion; /* Makes it visible on all backgrounds */
    display: none;
    transition: transform 0.1s ease;
}

@media (pointer: fine) {
    .cursor {
        display: block;
    }
    body {
        cursor: none;
    }
    a, button, .btn, .learn-box, .logo, i, .imgs img {
        cursor: none;
    }
}

.cursor-hover {
    transform: translate(-50%, -50%) scale(1.5);
    background-color: var(--white-color); /* Or a highlight color */
}


/* -----Scroll Animations----- */
.hidden {
    opacity: 0;
    filter: blur(5px);
    transform: translateY(50px);
    transition: all 0.6s ease-out; /* Speed up to 0.6s */
}

.show {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* Staggered delays for child elements if needed */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }

/* -----Decorative Floating Elements----- */
.floating-element {
    position: absolute;
    z-index: -1;
    /* Enable pointer events for hover */
    pointer-events: auto;
    animation: float 6s ease-in-out infinite;
    opacity: 0.8;
    /* Removed transition: translate as JS handles it for smoothness */
    transition: scale 0.3s ease, rotate 0.3s ease, filter 0.3s ease;
}

.floating-element:hover {
    scale: 1.1;
    rotate: 5deg;
    filter: brightness(1.2);
    z-index: 10; /* Bring to front on hover */
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

/* Hide on mobile to prevent clutter */
@media (max-width: 768px) {
    .floating-element {
        display: none;
    }
}

/* -----Page Transitions----- */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    pointer-events: none;
    display: flex;
    flex-direction: column;
}

.transition-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 100%;
    width: 100%;
    transform: translateY(0%); /* Default: Covering Screen */
    transition: transform 0.6s cubic-bezier(0.7, 0, 0.3, 1);
}

.transition-layer.layer-1 { background-color: #0e0e0e; z-index: 4; transition-delay: 0.1s; }
.transition-layer.layer-2 { background-color: #333333; z-index: 3; transition-delay: 0.2s; }
.transition-layer.layer-3 { background-color: #555555; z-index: 2; transition-delay: 0.3s; }
.transition-layer.layer-4 { background-color: #777777; z-index: 1; transition-delay: 0.4s; }

/* States */
.transition-layer.hidden-top {
    transform: translateY(-100%);
}
.transition-layer.hidden-bottom {
    transform: translateY(100%);
}
.transition-layer.visible {
    transform: translateY(0%);
}
