/* Global Styles */
:root {
    --bg-color: #212428;
    /* InBio charcoal background */
    --clr-shadow-1: #181a1d;
    --clr-shadow-2: #2b2e33;
    --text-color: #c4cfde;
    --title-color: #ffffff;
    --main-color: #ff014f;
    /* InBio reddish-pink accent */
    --accent-color: #f7b035;
    /* Yellow/Gold focus */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --inner-shadow: inset 5px 5px 10px #181a1d, inset -5px -5px 10px #2b2e33;
    --outer-shadow: 10px 10px 19px #1c1e22, -10px -10px 19px #262a2e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: var(--font-body);
}

h1,
h2,
h3,
.logo {
    font-family: var(--font-heading);
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

section {
    min-height: 100vh;
    padding: 10rem 9% 2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 9%;
    background: transparent;
    box-shadow: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.logo {
    font-size: 2.5rem;
    color: var(--text-color);
    font-weight: 700;
    cursor: default;
    transition: 0.3s;
}

.logo .dot {
    color: var(--main-color);
}

.nav-links {
    display: flex;
    gap: 3.5rem;
    list-style: none;
}

.nav-links li a {
    font-size: 1.1rem;
    color: var(--text-color);
    font-weight: 500;
    transition: 0.3s;
}

.nav-links li a:hover,
.nav-links li a.active {
    color: var(--main-color);
    text-shadow: 0 0 10px var(--main-color);
}

.close-menu,
.menu-toggle {
    display: none;
}

/* Hero Section */
#hero {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 15rem;
    min-height: 100vh;
    background-image: linear-gradient(rgba(33, 36, 40, 0.85), rgba(33, 36, 40, 0.95)), url('najwan5.jpg.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    z-index: 1;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5rem;
}

.hero-text {
    flex: 1;
}

.welcome-text {
    font-size: 1.4rem;
    letter-spacing: 3px;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--text-color);
    margin-bottom: 2rem;
}

.hero-text h1 {
    font-size: 6rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--title-color);
    margin-bottom: 1.5rem;
}

.hero-text h1 span {
    color: var(--main-color);
}

.hero-text h2 {
    font-size: 4.5rem;
    font-weight: 700;
    color: var(--title-color);
    margin-bottom: 3rem;
}

.hero-text .description {
    font-size: 1.6rem;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 3rem;
    max-width: 600px;
}

/* Stats Layout */
.stats-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 250px;
    margin-bottom: 4rem;
    border-left: 2px solid rgba(255, 255, 255, 0.05);
}

.stat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 2rem;
    position: relative;
}

.stat-item.active::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 1.5rem;
    background-color: var(--main-color);
    box-shadow: 0 0 5px var(--main-color);
}

.stat-num {
    font-size: 4rem;
    font-weight: 700;
    color: var(--title-color);
    line-height: 1;
}

.stat-label {
    font-size: 1.1rem;
    color: var(--text-color);
    text-align: right;
    font-weight: 500;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.hero-image img {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 10px;
    box-shadow: var(--outer-shadow);
    background: linear-gradient(145deg, #1e2125, #23272c);
    padding: 10px;
}

.social-icons-wrapper {
    display: flex;
    justify-content: flex-start;
    gap: 10rem;
    margin-top: 5rem;
}

.social-group p {
    text-transform: uppercase;
    font-size: 1.2rem;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.social-icons {
    display: flex;
    gap: 2rem;
}

.social-icons a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 6rem;
    height: 6rem;
    background: linear-gradient(145deg, #1e2125, #23272c);
    box-shadow: var(--outer-shadow);
    border-radius: 10px;
    font-size: 2rem;
    color: var(--title-color);
    transition: 0.5s ease;
}

.social-icons a:hover {
    background: linear-gradient(145deg, #23272c, #1e2125);
    color: var(--main-color);
    transform: translateY(-5px);
}

.btn {
    display: inline-block;
    padding: 1rem 2.8rem;
    background: var(--main-color);
    border-radius: 4rem;
    box-shadow: 0 0 10px var(--main-color);
    font-size: 1.2rem;
    color: var(--bg-color);
    letter-spacing: 0.1rem;
    font-weight: 600;
    transition: 0.5s ease;
    opacity: 0;
    animation: slideTop 1s ease forwards;
    animation-delay: 1.2s;
}

.btn:hover {
    box-shadow: 0 0 20px var(--main-color), 0 0 40px var(--accent-color);
    background: var(--accent-color);
    color: #fff;
}

/* Animations */
@keyframes slideRight {
    0% {
        transform: translateX(-100px);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideLeft {
    0% {
        transform: translateX(100px);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideTop {
    0% {
        transform: translateY(100px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 991px) {
    header {
        padding: 2rem 3%;
    }

    section {
        padding: 10rem 3% 2rem;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        font-size: 2rem;
        cursor: pointer;
        color: var(--text-color);
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 1rem 3%;
        background: var(--bg-color);
        border-top: .1rem solid rgba(0, 0, 0, .1);
        display: none;
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links.active {
        display: flex;
    }

    .hero-text h1 {
        font-size: 3rem;
    }

    .hero-text h3 {
        font-size: 1.5rem;
    }

    #hero {
        flex-direction: column-reverse;
        justify-content: center;
        text-align: center;
    }

    .hero-text {
        margin-top: 2rem;
    }

    .hero-image img {
        width: 60vw;
        margin-top: 4rem;
    }
    
    .social-icons-wrapper {
        flex-direction: column;
        gap: 2rem;
        align-items: center;
        justify-content: center;
        margin-top: 3rem;
    }

    .social-icons {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .social-icons a {
        width: 4.5rem;
        height: 4.5rem;
        font-size: 1.5rem;
    }

    .stats-column {
        margin: 0 auto 3rem auto;
    }
}

/* About Section */
.about {
    background-image: linear-gradient(rgba(33, 36, 40, 0.85), rgba(33, 36, 40, 0.95)), url('najwan6.jpg.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Optional: adds a nice parallax effect */
    background-repeat: no-repeat;
    position: relative;
    z-index: 1;
}

.about-content {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center; /* Center the text over the background */
    box-shadow: none; /* Remplove the solid box shadow */
    background: transparent; /* Remove the solid gradient so image is fully visible */
    padding: 5rem 0;
    max-width: 900px;
    margin: 0 auto;
}

.about-img img {
    width: 350px;
    height: auto;
    border-radius: 1.5rem;
    box-shadow: var(--outer-shadow);
    border: 10px solid #212428;
}

.about-text h3 {
    font-size: 2.5rem;
    color: var(--title-color);
    margin-bottom: 2rem;
}

.about-text p {
    font-size: 1.4rem;
    line-height: 1.8;
    margin-bottom: 3rem;
    color: var(--text-color);
}

@media (max-width: 768px) {
    .about-content {
        flex-direction: column;
        text-align: center;
    }

    .about-img img {
        width: 60vw;
    }
}

/* Section Headings */
.heading {
    text-align: center;
    font-size: 3.2rem;
    margin-bottom: 3rem;
}

.heading span {
    color: var(--main-color);
}

/* Skills Section */
.skills {
    background: var(--second-bg-color);
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
}

.skills-box {
    background: linear-gradient(145deg, #1e2125, #23272c);
    box-shadow: var(--outer-shadow);
    padding: 3rem 2rem;
    border-radius: 2rem;
    text-align: center;
    transition: transform 0.1s ease, border-color 0.5s ease, box-shadow 0.5s ease, background 0.5s ease;
    transform-style: preserve-3d;
}

.skills-box:hover {
    border-color: var(--main-color);
    box-shadow: 0 10px 30px rgba(255, 1, 79, 0.2);
}

.skills-box i {
    font-size: 5rem;
    color: var(--main-color);
    margin-bottom: 1rem;
    transform: translateZ(50px);
    display: inline-block;
}

.skills-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    transform: translateZ(50px);
    border: 2px solid rgba(255, 255, 255, 0.05);
}

.skills-box h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    transform: translateZ(40px);
}

.skills-box p {
    font-size: 1.1rem;
    line-height: 1.6;
    transform: translateZ(30px);
}

/* Projects Section */
.projects {
    background: var(--bg-color);
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.projects-box {
    background: linear-gradient(145deg, #1e2125, #23272c);
    box-shadow: var(--outer-shadow);
    border-radius: 2rem;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.1s ease, background 0.5s ease;
    transform-style: preserve-3d;
}

.projects-box:hover {
    background: linear-gradient(145deg, #23272c, #1e2125);
}

.projects-img-wrapper {
    width: 100%;
    height: 250px;
    border-radius: 1.5rem;
    overflow: hidden;
    margin-bottom: 2.5rem;
    transform: translateZ(40px);
}

.projects-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s ease;
}

.projects-content {
    transform: translateZ(30px);
    transform-style: preserve-3d;
}

.projects-content span {
    color: var(--main-color);
    text-transform: uppercase;
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.projects-content h4 {
    font-size: 2.4rem;
    color: var(--title-color);
    margin: 1.5rem 0;
    transform: translateZ(10px);
}

.projects-content a i {
    font-size: 2rem;
    color: var(--main-color);
    transform: translateZ(15px);
    display: inline-block;
}

/* Responsive Font Sizes for Projects */
@media (max-width: 600px) {
    .projects-content h4 {
        font-size: 2rem;
    }

    .projects-content p {
        font-size: 1.2rem;
    }
}

/* Services Section */
.services {
    background: var(--second-bg-color);
}

.services-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.services-box {
    background: linear-gradient(145deg, #1e2125, #23272c);
    box-shadow: var(--outer-shadow);
    padding: 3.5rem;
    border-radius: 2rem;
    text-align: left;
    transition: transform 0.1s ease, background 0.5s ease;
    transform-style: preserve-3d;
}

.services-box:hover {
    background: linear-gradient(145deg, #23272c, #1e2125);
    box-shadow: 0 10px 30px rgba(255, 1, 79, 0.2);
}

.services-box i {
    font-size: 5rem;
    color: var(--main-color);
    margin-bottom: 1rem;
    transform: translateZ(50px);
    display: inline-block;
}

.services-box h3 {
    font-size: 2.6rem;
    transform: translateZ(40px);
}

.services-box p {
    font-size: 1.6rem;
    margin: 1rem 0 3rem;
    transform: translateZ(30px);
}

.services-box .btn {
    transform: translateZ(40px);
}

/* Contact Section */
.contact {
    background: var(--bg-color);
}

.contact h2 {
    margin-bottom: 3rem;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.contact-box {
    background: linear-gradient(145deg, #1e2125, #23272c);
    box-shadow: var(--outer-shadow);
    padding: 3rem 2rem;
    border-radius: 2rem;
    text-align: center;
    width: 320px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-box:hover {
    box-shadow: 0 10px 30px rgba(255, 1, 79, 0.2);
    transform: translateY(-5px);
}

.contact-box > i {
    font-size: 3.5rem;
    color: var(--main-color);
    margin-bottom: 1.5rem;
}

.contact-box h3 {
    font-size: 2rem;
    color: var(--title-color);
    margin-bottom: 1rem;
}

.contact-box p {
    font-size: 1.4rem;
    color: var(--text-color);
    margin-bottom: 2.5rem;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    color: var(--main-color);
    font-size: 1.4rem;
    font-weight: 500;
    transition: 0.3s;
}

.contact-link:hover {
    color: var(--accent-color);
    transform: translateX(5px);
}

.contact-link i {
    font-size: 1.2rem;
    margin-left: 0.8rem;
}

.contact form {
    max-width: 70rem;
    margin: 1rem auto;
    text-align: center;
    margin-bottom: 3rem;
}

.or-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4rem 0;
    position: relative;
}

.or-divider::before,
.or-divider::after {
    content: '';
    flex: 1;
    max-width: 200px;
    height: 1px;
    background: var(--text-color);
    opacity: 0.3;
}

.or-divider span {
    margin: 0 2rem;
    color: var(--text-color);
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: 2px;
}

.contact form .input-box {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.contact form .input-box input,
.contact form textarea {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.6rem;
    color: var(--text-color);
    background: var(--second-bg-color);
    border-radius: .8rem;
    margin: .7rem 0;
}

.contact form .input-box input {
    width: 49%;
}

.contact form textarea {
    resize: none;
}

.contact form .btn {
    margin-top: 2rem;
    cursor: pointer;
}

/* Footer */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 2rem 9%;
    background: var(--second-bg-color);
}

.footer-text p {
    font-size: 1.6rem;
}

.footer-iconTop a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: .8rem;
    background: var(--main-color);
    border-radius: .8rem;
    transition: .5s ease;
}

.footer-iconTop a:hover {
    box-shadow: 0 0 1rem var(--main-color);
}

.footer-iconTop a i {
    font-size: 2.4rem;
    color: var(--second-bg-color);
}

/* Breakpoints for Contact */
@media (max-width: 617px) {
    .contact form .input-box input {
        width: 100%;
    }
}

/* Video Section */
.videos {
    background: var(--second-bg-color);
}

.videos-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.video-box {
    background: var(--bg-color);
    padding: 1rem;
    border-radius: 1rem;
    text-align: center;
}

.video-box h3 {
    margin-top: 1rem;
    font-size: 1.5rem;
}

/* Reveal Animations */
.reveal-init {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal {
    opacity: 1;
    transform: translateY(0);
}

.projects-box.reveal-init {
    transform: scale(0.9);
}

.projects-box.reveal {
    transform: scale(1);
}

/* 3D and Interactive Effects Extras */
.glare {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    mix-blend-mode: screen;
    z-index: 10;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

.hero-image,
.about-img {
    animation: float 6s ease-in-out infinite;
    perspective: 1000px;
}

.hero-image img,
.about-img img {
    transform-style: preserve-3d;
    transition: transform 0.1s ease, box-shadow 0.5s ease;
}

.hero-image img:hover,
.about-img img:hover {
    box-shadow: 0 20px 40px rgba(255, 1, 79, 0.4);
}

/* Extra Mobile Optimizations */
@media (max-width: 480px) {
    .projects-container,
    .skills-container,
    .services-container {
        grid-template-columns: 1fr;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .hero-text h2 {
        font-size: 1.8rem;
    }
    
    .hero-text .description {
        font-size: 1.2rem;
        margin-bottom: 3rem;
    }
    
    .social-icons-wrapper {
        flex-direction: column;
        gap: 2rem;
    }

    .heading {
        font-size: 2.5rem;
    }
    
    section {
        padding: 5rem 5% 2rem;
    }
    
    #hero {
        padding-top: 8rem;
    }
    
    .about-content {
        padding: 2rem 5%;
    }
    
    .about-text h3 {
        font-size: 1.5rem;
    }
    
    .about-text p {
        font-size: 1.1rem;
    }
}