/* ======================================================
   Google Font Import & Root Variables
   ====================================================== */
@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #fdfdfd;
    --text-color: #333;
    --main-color: #00b894;
    --white-color: #fdfdfd;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --darker-bg-color: #f4f4f4;
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #fdfdfd;
    --main-color: #00b894;
    --white-color: #2c2c2c;
    --shadow-color: rgba(0, 0, 0, 0.7);
    --darker-bg-color: #222;
}

/* ======================================================
   General Styles & Resets
   ====================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: 'Hind Siliguri', sans-serif;
}

html {
    font-size: 62.5%; /* 1rem = 10px */
    overflow-x: hidden;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    transition: background 0.3s, color 0.3s;
}

section {
    min-height: 100vh;
    padding: 10rem 9% 2rem;
}

.heading {
    text-align: center;
    font-size: 4.5rem;
    margin-bottom: 3rem;
}

.heading span {
    color: var(--main-color);
}

.btn {
    display: inline-block;
    padding: 1.2rem 2.8rem;
    background: var(--main-color);
    border-radius: 4rem;
    box-shadow: 0 0 1rem var(--main-color);
    font-size: 1.6rem;
    color: var(--white-color);
    letter-spacing: .1rem;
    font-weight: 600;
    transition: .5s ease;
    border: 2px solid var(--main-color);
}

.btn:hover {
    background: transparent;
    color: var(--main-color);
    box-shadow: none;
}

/* ======================================================
   Preloader, Scrollbar & Header
   ====================================================== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 1001;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s;
}
.loader {
    border: 8px solid var(--darker-bg-color);
    border-top: 8px solid var(--main-color);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

#scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: var(--main-color);
    width: 0%;
    z-index: 1000;
    transition: width 0.1s;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 9%;
    background: var(--bg-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    transition: .3s;
}

.header.sticky {
    box-shadow: 0 .5rem 1rem var(--shadow-color);
}

.logo {
    font-size: 2.5rem;
    color: var(--main-color);
    font-weight: 700;
    cursor: default;
}

.navbar a {
    font-size: 1.7rem;
    color: var(--text-color);
    margin-left: 4rem;
    font-weight: 500;
    transition: .3s;
}

.navbar a:hover,
.navbar a.active {
    color: var(--main-color);
}

#menu-icon {
    font-size: 3.6rem;
    color: var(--text-color);
    display: none;
    cursor: pointer;
}

.theme-switcher i {
    font-size: 2.4rem;
    cursor: pointer;
    color: var(--text-color);
}

/* ======================================================
   Hero Section
   ====================================================== */
.hero {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8rem;
}

.hero-content {
    max-width: 60rem;
}

.hero-content h3 {
    font-size: 3.2rem;
    font-weight: 700;
}

.hero-content h1 {
    font-size: 5.6rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 1rem 0;
}

.hero-content p {
    font-size: 1.6rem;
}

.typing-text {
    color: var(--main-color);
}

.social-icons a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    background: transparent;
    border: .2rem solid var(--main-color);
    border-radius: 50%;
    font-size: 2rem;
    color: var(--main-color);
    margin: 3rem 1.5rem 3rem 0;
    transition: .5s ease;
}

.social-icons a:hover {
    background: var(--main-color);
    color: var(--white-color);
    box-shadow: 0 0 1rem var(--main-color);
}

.hero-image img {
    width: 35vw;
    border-radius: 50%;
    border: 0.5rem solid var(--main-color);
    box-shadow: 0 0 3rem var(--main-color);
    animation: floatImage 4s ease-in-out infinite;
}

/* ======================================================
   About Section
   ====================================================== */
.about {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8rem;
    background: var(--darker-bg-color);
}

.about-img img {
    width: 35vw;
    border-radius: 2rem;
}

.about-content h2 {
    text-align: left;
    line-height: 1.2;
}

.about-content h3 {
    font-size: 2.6rem;
    margin-bottom: 1rem;
}

.about-content p {
    font-size: 1.6rem;
    margin: 2rem 0 3rem;
}

/* ======================================================
   Skills Section (for About page)
   ====================================================== */
.skills-container {
    max-width: 80rem;
    margin: 0 auto;
}
.skill-box {
    margin-bottom: 2.5rem;
}
.skill-box h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 500;
}
.skill-bar {
    width: 100%;
    height: 2rem;
    background-color: var(--darker-bg-color);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--main-color);
}
.skill-bar span {
    display: block;
    height: 100%;
    background-color: var(--main-color);
    border-radius: 1rem;
}

/* ======================================================
   Services Section
   ====================================================== */
.services-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.service-box {
    flex: 1 1 30rem;
    background: var(--darker-bg-color);
    padding: 3rem 2rem 4rem;
    border-radius: 2rem;
    text-align: center;
    border: .2rem solid var(--bg-color);
    transition: .5s ease;
}

.service-box:hover {
    border-color: var(--main-color);
    transform: scale(1.02);
}

.service-box i {
    font-size: 7rem;
    color: var(--main-color);
}

.service-box h3 {
    font-size: 2.6rem;
    margin: 1rem 0;
}

.service-box p {
    font-size: 1.6rem;
    margin: 1rem 0 3rem;
}

.service-box ul {
    list-style: none;
    text-align: left;
    margin: 2rem 0;
}

.service-box ul li {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.service-box ul li i {
    font-size: 1.8rem;
    margin-right: 1rem;
}

/* ======================================================
   Portfolio / Projects Section
   ====================================================== */
.portfolio {
    background: var(--darker-bg-color);
}

.portfolio-filter {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.portfolio-filter .btn {
    padding: 0.8rem 2rem;
    font-size: 1.5rem;
}

.portfolio-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(30rem, 1fr));
    gap: 2.5rem;
}

.portfolio-box {
    position: relative;
    border-radius: 2rem;
    box-shadow: 0 0 1rem rgba(0,0,0, .1);
    overflow: hidden;
    display: flex;
}

.portfolio-box img {
    width: 100%;
    transition: .5s ease;
}

.portfolio-box:hover img {
    transform: scale(1.1);
}

.portfolio-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,0,0,.1), var(--main-color));
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    padding: 0 4rem;
    transform: translateY(100%);
    transition: .5s ease;
}

.portfolio-box:hover .portfolio-layer {
    transform: translateY(0);
}

.portfolio-layer h4 {
    font-size: 3rem;
    color: #fff;
}

.portfolio-layer p {
    font-size: 1.6rem;
    margin: .3rem 0 1rem;
    color: #fff;
}

.portfolio-layer a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 5rem;
    height: 5rem;
    background: var(--white-color);
    border-radius: 50%;
}

.portfolio-layer a i {
    font-size: 2rem;
    color: #333;
}

/* ======================================================
   Contact Links Section
   ====================================================== */
.contact-links .sub-heading {
    text-align: center;
    font-size: 1.8rem;
    max-width: 60rem;
    margin: 0 auto 5rem;
    line-height: 1.6;
}
.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
}
.contact-box {
    background: var(--darker-bg-color);
    padding: 3rem 2rem;
    border-radius: 2rem;
    text-align: center;
    box-shadow: 0 .5rem 1rem var(--shadow-color);
    transition: .5s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-color);
}
.contact-box:hover {
    transform: translateY(-1rem);
    border: .2rem solid var(--main-color);
}
.contact-box i {
    font-size: 5rem;
    color: var(--main-color);
    margin-bottom: 1.5rem;
}
.contact-box h3 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}
.contact-box p {
    font-size: 1.5rem;
    color: #888;
    word-break: break-all;
}
.contact-box span {
    margin-top: 1.5rem;
    font-size: 1.6rem;
    color: var(--main-color);
    font-weight: 600;
}

/* ======================================================
   Footer
   ====================================================== */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 2rem 9%;
    background: var(--darker-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(--white-color);
}


/* ======================================================
   Animations
   ====================================================== */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes floatImage {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-2.4rem);
    }
    100% {
        transform: translateY(0);
    }
}

.typed-cursor {
    font-size: 4rem;
    color: var(--main-color);
}


/* ======================================================
   Responsive Media Queries
   ====================================================== */
@media (max-width: 1200px) {
    html {
        font-size: 55%;
    }
}

@media (max-width: 991px) {
    .header {
        padding: 2rem 3%;
    }
    section {
        padding: 10rem 3% 2rem;
    }
    .footer {
        padding: 2rem 3%;
    }
    .hero {
        gap: 4rem;
    }
    .about {
        gap: 4rem;
    }
}

@media (max-width: 768px) {
    #menu-icon {
        display: block;
    }
    .navbar {
        position: absolute;
        top: 100%;
        left: -100%;
        width: 100%;
        padding: 1rem 3%;
        background: var(--bg-color);
        border-top: .1rem solid rgba(0,0,0,.2);
        box-shadow: 0 .5rem 1rem rgba(0,0,0,.2);
        transition: .3s ease;
    }
    .navbar.active {
        left: 0;
    }
    .navbar a {
        display: block;
        font-size: 2rem;
        margin: 3rem 0;
    }
    .hero {
        flex-direction: column;
        text-align: center;
    }
    .hero-content {
        order: 2;
    }
    .hero-image {
        order: 1;
    }
    .hero-image img {
        width: 70vw;
        margin-top: 4rem;
    }
    .about {
        flex-direction: column-reverse;
        text-align: center;
    }
    .about-content h2 {
        text-align: center;
    }
    .about-img img {
        width: 70vw;
        margin-top: 4rem;
    }
}

@media (max-width: 450px) {
    html {
        font-size: 50%;
    }
}