/* =========================================
   GLOBAL STYLES & LAYOUT
   ========================================= */

/* Font faces */
@font-face { font-family: glacial-indifference; src: url(../resources/fonts/glacial-indifference/glacial-indifference-regular.otf); }
@font-face { font-family: great-vibes; src: url(../resources/fonts/great-vibes/great-vibes.ttf); }
@font-face { font-family: poppins; src: url(../resources/fonts/poppins/poppins.ttf); }
@font-face { font-family: american-signature; src: url(../resources/fonts/american-signature/american-signature.ttf); }

/* Base styles */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    min-height: 100%;
}

body {
    font-family: poppins, sans-serif;
    background: #eef0f4;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
body::-webkit-scrollbar { display: none; }
img { max-width: 100%; height: auto; display: block; }

/* Particle Background */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Behind content but above background */
    pointer-events: none;
}

/* Container */
#container {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    position: relative;
    z-index: 1;
}

/* Animation Utility Classes */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}
.reveal-on-scroll.in-view {
    opacity: 1;
    transform: translateY(0);
}
.clearfix::after {
    content: ""; display: table; clear: both;
}

/* =========================================
   NAVIGATION
   ========================================= */
#navigation {
    position: fixed;
    top: 20px;
    right: 50%;
    transform: translateX(50%);
    width: auto;
    z-index: 100000;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 10px 30px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    display: flex;
    gap: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.nav-button {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    font-family: poppins, sans-serif;
    font-weight: 500;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
    color: #555;
    position: relative;
}

.nav-button:hover {
    color: rgb(40, 180, 110);
    background: rgba(57, 252, 155, 0.1);
}

.nav-button.active {
    color: rgb(30, 140, 80);
    background: rgba(57, 252, 155, 0.2);
    font-weight: 600;
}

#theme-button {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
}
#theme-icon { width: 20px; height: 20px; transition: 0.3s; }
#theme-button:hover #theme-icon { transform: rotate(15deg); }

/* Mobile Menu */
.hamburger-menu {
    display: none;
    position: fixed;
    top: 20px; right: 20px;
    width: 50px; height: 50px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    z-index: 100001;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.hamburger-icon {
    position: relative; width: 24px; height: 18px; margin: 16px auto;
}
.hamburger-icon span {
    display: block; position: absolute; height: 3px; width: 100%;
    background: rgb(57, 252, 155); border-radius: 2px;
    transition: 0.3s;
}
.hamburger-icon span:nth-child(1) { top: 0px; }
.hamburger-icon span:nth-child(2) { top: 7px; }
.hamburger-icon span:nth-child(3) { top: 14px; }

.hamburger-menu.active .hamburger-icon span:nth-child(1) { top: 7px; transform: rotate(135deg); }
.hamburger-menu.active .hamburger-icon span:nth-child(2) { opacity: 0; left: -60px; }
.hamburger-menu.active .hamburger-icon span:nth-child(3) { top: 7px; transform: rotate(-135deg); }

.mobile-menu {
    position: fixed; top: 0; right: -100%;
    width: 80%; max-width: 300px; height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    z-index: 100000;
    transition: 0.4s;
    box-shadow: -10px 0 40px rgba(0,0,0,0.1);
    display: flex; flex-direction: column; padding-top: 80px;
}
.mobile-menu.active { right: 0; }

.mobile-nav-item {
    padding: 15px 30px; margin: 5px 15px;
    border: none; background: transparent;
    font-family: poppins; font-size: 1.1em;
    text-align: left; cursor: pointer;
    border-radius: 10px; transition: 0.3s;
    color: #333;
}
.mobile-nav-item.active, .mobile-nav-item:hover {
    background: rgba(57, 252, 155, 0.15);
    color: rgb(30, 140, 80);
    transform: translateX(5px);
}
.mobile-menu-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    z-index: 99999;
    opacity: 0; visibility: hidden; transition: 0.3s;
}
.mobile-menu-overlay.active { opacity: 1; visibility: visible; }
.mobile-theme-button {
    margin: 20px; padding: 15px;
    background: rgba(57, 252, 155, 0.1);
    border: 1px solid rgba(57, 252, 155, 0.3);
    border-radius: 15px; cursor: pointer;
}

/* =========================================
   SECTIONS GENERAL
   ========================================= */
.section {
    width: 100%;
    position: relative;
    display: flex; flex-direction: column;
    align-items: center;
    scroll-margin-top: 100px;
    padding: 80px 0 60px;
}
.page-title {
    font-size: 3em; text-align: center;
    margin: 0 auto 40px; max-width: 80%;
    font-weight: 700; color: #444;
}
.page-content-container {
    display: flex; flex-direction: row;
    padding: 20px; max-width: 1400px; margin: 0 auto;
    width: 100%; gap: 20px;
}
.section-divider { height: 60px; width: 100%; display: block; }

/* =========================================
   HOME
   ========================================= */
#home {
    min-height: 100vh; padding: 0;
    flex-direction: row; justify-content: center; align-items: stretch;
}
#banner {
    flex: 1; height: 100vh;
    background: url(../resources/images/banner_img.jpg) no-repeat center center;
    background-size: cover;
    filter: brightness(100%) sepia(1) hue-rotate(132deg) saturate(103.2%) brightness(91.2%);
    max-width: 40%; position: relative; transition: 0.3s;
}
#banner:hover {
    filter: brightness(100%) sepia(1) hue-rotate(132deg) saturate(103.2%) brightness(100%) drop-shadow(20px -30px 30px rgb(57, 252, 155, 0.3));
}
#home-splash-container {
    flex: 1; display: flex; flex-direction: column;
    justify-content: center; text-align: center; padding: 40px;
}
#name-banner {
    height: 100%; display: flex; flex-direction: column;
    justify-content: center; text-align: center;
}
#signature {
    font-family: american-signature; font-size: 18vh;
    flex: 1; margin-top: 45%; color: #eee;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}
#designation {
    flex: 1; font-family: poppins; margin-bottom: 30%;
    font-weight: 600; font-size: 1.8rem; color: #eee;
}
.horizontal-list {
    display: flex; flex-direction: row; justify-content: space-around; margin: auto;
}
.small-icon {
    border-radius: 10px; max-width: 50px;
    background: rgba(57, 252, 155, 0.1);
    border: 1px solid rgba(255,255,255,0.5);
    font-size: 2em; color: #eee;
    padding: 10px; margin: 0 5px;
    transition: 0.25s;
}
.small-icon:hover {
    background: rgb(57, 252, 155, 0.2);
    transform: translateY(-10px);
}
.blob {
    position: absolute; top: -30px; left: 10px; z-index: -1;
    width: 400px; height: 350px;
    background: linear-gradient(180deg, rgba(117, 242, 188, 0.571) 31.77%, #32cb89 100%);
    mix-blend-mode: multiply;
    animation: move 25s infinite alternate;
}
@keyframes move {
    from { transform: rotate(-90deg); border-radius: 24% 76% 35% 65% / 27% 36% 64% 73%; }
    to { transform: rotate(-10deg); border-radius: 76% 24% 33% 67% / 68% 55% 45% 32%; }
}
.floating { animation: floating 3s infinite ease-in-out; }
@keyframes floating {
    0% { transform: translate(0, 0px); }
    50% { transform: translate(0, 8px); }
    100% { transform: translate(0, 0px); }
}
#contact-click-button {
    transition: 0.4s; cursor: pointer; color: white;
    font-weight: bold; width: 160px; font-size: 1.1em;
    padding: 12px 25px; border-radius: 30px;
    background-image: linear-gradient(to right, #25aae1, #40e495, #30dd8a, #2bb673);
    background-size: 300% 100%;
    box-shadow: 0 5px 15px rgba(49, 196, 190, 0.4);
    display: flex; align-items: center; justify-content: space-between;
    margin: 20px auto;
}
#contact-click-button:hover { background-position: 100% 0; transform: translateY(-2px); }

/* Scroll Button */
#scroll-button {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
    width: 50px; height: 50px; z-index: 200000;
    border-radius: 50%; background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; border: 1px solid rgba(255,255,255,0.5);
    transition: 0.3s;
}
#scroll-button:hover {
    transform: translateX(-50%) translateY(-5px);
    box-shadow: 0 8px 25px rgba(57, 252, 155, 0.3);
}

/* =========================================
   ABOUT
   ========================================= */
.about-title-container {
    display: flex; flex-direction: column; align-items: center; margin-bottom: 40px;
}
.about-avatar {
    width: 120px; height: 120px; border-radius: 50%;
    background: rgba(57, 252, 155, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(57, 252, 155, 0.3);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 20px; position: relative;
}
.about-avatar::before { content: "👨‍💻"; font-size: 3em; }
.about-cards-container {
    max-width: 1200px; margin: 0 auto; padding: 0 20px;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px; justify-items: center;
}
.about-card {
    width: 100%; max-width: 380px; min-height: 220px;
    padding: 30px; border-radius: 20px;
    position: relative; overflow: hidden;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: 0.3s;
}
.about-card:hover { transform: translateY(-10px); }
.about-card.ml-passion { background: rgba(233, 104, 123, 0.15); }
.about-card.expertise { background: rgba(108, 124, 246, 0.15); }
.about-card.experience { background: rgba(244, 120, 244, 0.15); }
.about-card.technical-skills { background: rgba(107, 255, 107, 0.15); }
.about-card.projects { background: rgba(244, 153, 74, 0.15); }
.about-card.coding-philosophy { background: rgba(41, 255, 205, 0.15); }

.about-card-icon { font-size: 2.2em; margin-bottom: 15px; }
.about-card-title { font-size: 1.3em; margin-bottom: 10px; font-weight: 600; }
.about-card-description { font-size: 0.95em; line-height: 1.6; }

/* =========================================
   EXPERIENCE
   ========================================= */
.timeline-container {
    max-width: 1000px; margin: 0 auto; position: relative; padding: 40px 0;
}
.timeline-line {
    position: absolute; width: 4px; background: rgb(57, 252, 155);
    top: 0; bottom: 0; left: 50%; transform: translateX(-50%);
}
.timeline-node {
    position: relative; min-height: 200px; margin-bottom: 50px;
}
.timeline-point {
    position: absolute; width: 20px; height: 20px;
    background: #fff; border: 4px solid rgb(57, 252, 155);
    border-radius: 50%; left: 50%; transform: translateX(-50%);
    top: 20px; z-index: 2;
}
.timeline-content {
    width: 45%; position: relative;
}
.timeline-left { left: 0; text-align: right; }
.timeline-right { left: 55%; text-align: left; }
.experience-card-front {
    background: #f0f3f7; border-radius: 20px;
    box-shadow: inset 5px 5px 10px rgba(163,177,198, 0.2), inset -5px -5px 10px rgba(255,255,255, 0.8);
    padding: 20px;
}
.experience-card-back {
    background: white; border-radius: 20px; padding: 20px;
    box-shadow: 10px 10px 20px rgba(163,177,198, 0.3);
}

/* =========================================
   PORTFOLIO
   ========================================= */
.project-carousel {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 30px;
    padding: 40px 20px; max-width: 1400px; margin: 0 auto;
}
.project-card {
    width: 300px; height: 400px; perspective: 1000px;
}
.project-card-inner {
    position: relative; width: 100%; height: 100%; text-align: center;
    transition: transform 0.6s; transform-style: preserve-3d;
}
.project-card-front, .project-card-back {
    position: absolute; width: 100%; height: 100%; backface-visibility: hidden;
    border-radius: 15px; overflow: hidden;
}
.project-card-front { background: #fff; }
.project-card-back {
    background: linear-gradient(145deg, rgba(43, 179, 111, 0.9), rgba(43, 179, 111, 0.8));
    color: white; transform: rotateY(180deg);
    display: flex; flex-direction: column; justify-content: center; padding: 20px;
}
.project-image {
    height: 200px; background: #eee; display: flex; align-items: center; justify-content: center;
}
.project-title { margin: 15px 0; font-size: 1.2em; }
.project-tags { display: flex; gap: 5px; justify-content: center; flex-wrap: wrap; }
.project-tag {
    font-size: 0.8em; padding: 3px 8px; border-radius: 10px;
    background: rgba(57, 252, 155, 0.2);
}

/* =========================================
   SKILLS
   ========================================= */
#skills .page-content-container {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px; padding: 40px 20px; justify-items: center;
}
.skill-container {
    width: 100%; max-width: 300px; height: 520px;
    display: flex; flex-direction: column; justify-content: space-between;
    text-align: center; border-radius: 20px;
    background: #f0f3f7;
    box-shadow: 10px 10px 20px rgba(163, 177, 198, 0.5), -10px -10px 20px rgba(255, 255, 255, 0.8);
    position: relative;
}
.skill-icon {
    position: absolute; top: -20px; left: 20px; width: 60px; height: 60px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: #eef0f4; box-shadow: 5px 5px 10px rgba(0,0,0,0.1);
    font-size: 1.5em;
}
#programming .skill-icon { color: rgb(30, 120, 60); }
#mlds .skill-icon { color: rgb(40, 120, 160); }
#cloudinfra .skill-icon { color: rgb(180, 60, 60); }
#util .skill-icon { color: rgb(140, 100, 30); }

.skill-middle-container {
    background: rgba(0,0,0,0.03); margin: 10px; border-radius: 15px; padding: 15px;
    text-align: left;
}
.skilllist-item {
    display: flex; align-items: center; padding: 5px 0;
}
.skilllist-item-logo { width: 30px; text-align: center; margin-right: 10px; }

/* =========================================
   CONTACT
   ========================================= */
.contact-container {
    max-width: 1000px; margin: 0 auto; display: flex; gap: 40px; padding: 20px;
}
.contact-info, .contact-form {
    flex: 1; padding: 40px; border-radius: 25px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
}
.contact-info-item {
    display: flex; align-items: center; gap: 15px; margin-bottom: 20px;
}
.contact-icon { font-size: 1.5em; width: 40px; text-align: center; }
.form-group { margin-bottom: 15px; }
.form-control {
    width: 100%; padding: 12px; border-radius: 10px; border: 1px solid #ddd;
    background: #f9f9f9;
}
.submit-btn {
    width: 100%; padding: 12px; border: none; border-radius: 10px;
    background: linear-gradient(135deg, rgb(57, 252, 155), rgb(151, 227, 255));
    color: white; font-weight: bold; cursor: pointer;
}

/* =========================================
   FOOTER
   ========================================= */
#footer {
    background: linear-gradient(135deg, #7ed8a7, #59b978);
    border-radius: 50px 50px 0 0; padding: 50px 20px 20px;
    color: white; text-align: center;
}
#footer-banner-floating img { width: clamp(150px, 40vw, 250px); margin-bottom: 20px; }
#quote { font-size: 2em; margin-bottom: 30px; }

/* =========================================
   THEMES
   ========================================= */
.light-theme { background: #eef0f4; color: #333; }
.dark-theme { background: #1a1a1a; color: #eee; }

.dark-theme .nav-button { color: #ccc; }
.dark-theme .nav-button:hover { color: white; background: rgba(255,255,255,0.1); }
.dark-theme #navigation { background: rgba(30,30,30,0.8); border-color: rgba(255,255,255,0.1); }
.dark-theme .hamburger-menu { background: rgba(30,30,30,0.8); border-color: rgba(255,255,255,0.1); }
.dark-theme .mobile-menu { background: rgba(30,30,30,0.95); }
.dark-theme .mobile-nav-item { color: #eee; }
.dark-theme .about-card { background: rgba(255,255,255,0.05); }
.dark-theme .experience-card-front { background: #222; box-shadow: none; border: 1px solid #333; }
.dark-theme .experience-card-back { background: #222; color: #eee; }
.dark-theme .skill-container { background: #222; box-shadow: none; border: 1px solid #333; }
.dark-theme .contact-info, .dark-theme .contact-form { background: rgba(0,0,0,0.3); color: #eee; }
.dark-theme .form-control { background: #333; color: #eee; border-color: #444; }

/* =========================================
   RESPONSIVE
   ========================================= */
@media screen and (max-width: 992px) {
    #home { flex-direction: column; }
    #banner {
        max-width: 100%;
        height: auto;
        min-height: 50vh;
        flex: none;
        padding: 40px 10px;
        background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url(../resources/images/banner_img.jpg) no-repeat center center;
        background-size: cover;
        filter: brightness(100%) sepia(1) hue-rotate(132deg) saturate(103.2%);
    }

    #home-splash-container {
        padding: 20px;
        justify-content: flex-start;
    }

    #name-banner {
        height: auto;
        padding: 20px 0;
    }

    #signature {
        font-size: 4em;
        margin-top: 0;
        flex: none;
        margin-bottom: 10px;
    }

    .small-icon {
        font-size: 1.5em;
        padding: 8px;
        max-width: 45px;
    }

    #designation {
        margin-bottom: 20px;
        font-size: 1.1rem;
        padding: 0 10px;
        flex: none;
        white-space: normal;
        overflow-wrap: break-word;
        word-wrap: break-word;
        line-height: 1.4;
        width: 100%;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .contact-container { flex-direction: column; }
}

@media screen and (max-width: 768px) {
    #navigation { display: none; }
    .hamburger-menu { display: block; }

    #signature { font-size: 4em; }
    #designation { font-size: 1.2rem; }

    .timeline-line { left: 20px; }
    .timeline-point { left: 20px; }
    .timeline-content { width: calc(100% - 70px); text-align: left; }
    .timeline-left, .timeline-right { left: 50px; text-align: left; }

    #about-stats { flex-direction: column; }

    #contact-click-button { margin-top: 20px; }

    /* Ensure splash content is at top on tablet/mobile */
    #home-splash-container {
        padding-top: 20px;
    }

    #scroll-button {
        left: auto;
        right: 20px;
        transform: none;
        bottom: 20px;
    }
    #scroll-button:hover {
        transform: translateY(-5px);
    }
}

@media screen and (max-width: 576px) {
    .page-title { font-size: 2em; }
    #banner { min-height: 50vh; }
    #signature { font-size: 2.5em; }
    #designation { font-size: 0.95rem; }
    .project-card { width: 100%; }

    #home-splash-container {
        padding: 20px 10px;
    }

    #main-splash-hi { position: relative; z-index: 1; }

    /* Center blob using margins to avoid conflict with animation transform */
    .blob {
        width: 300px;
        height: 260px;
        left: 50%;
        top: 50%;
        margin-left: -150px;
        margin-top: -130px;
        transform: none; /* Let animation handle rotation */
    }

    #main-splash { max-width: 80%; margin: 0 auto; }

    /* Mobile spacing optimizations */
    .section { padding: 60px 0 40px; }
    .contact-info, .contact-form { padding: 20px; }
    .page-content-container { gap: 15px; }
    .skill-container { width: 100%; max-width: none; }
}
