/* =========================================
   1. BASE RESET & ROOT ENVIRONMENT
========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100vh;
    font-family: 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #0f172a, #793b7a);
    color: white;
    overflow-x: hidden;
    overflow-y: auto;
}


/* =========================================
   2. STICKY GLASSMORPHIC NAVBAR
========================================= */

.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 80px;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0 45px !important;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    width: 100% !important;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #ff69b4;
    text-shadow: 0 0 15px #ff69b4;
}

.navbar ul {
    display: flex !important;
    flex-direction: row !important;
    gap: 28px !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.navbar ul li a {
    text-decoration: none;
    color: white;
    font-weight: 500;
    position: relative;
    transition: 0.3s;
    cursor: pointer;
}

.navbar ul li a:hover,
.navbar ul li a.active {
    color: #ff69b4;
}

.navbar ul li a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0%;
    height: 2px;
    background: #ff69b4;
    transition: 0.3s;
}

.navbar ul li a:hover::after,
.navbar ul li a.active::after {
    width: 100%;
}


/* =========================================
   3. FLOATING BACKGROUND BRAND ICONS
========================================= */

body.home-page {
    overflow-y: auto;
}

.bg-icons {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.icon {
    position: absolute;
    width: 55px;
    opacity: 0.18;
    filter: blur(0.3px);
}

.i1 { top: 12%; left: 10%; }
.i2 { top: 18%; right: 14%; }
.i3 { bottom: 18%; left: 12%; }
.i4 { bottom: 14%; right: 10%; }
.i5 { top: 48%; left: 6%; }
.i6 { top: 52%; right: 6%; }


/* =========================================
   4. HERO SECTIONS & LAYOUTS
========================================= */

.home {
    height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
    padding: 20px;
}

.image-container {
    position: relative;
    width: 100%;
    max-width: 700px;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 90px;
}

.profile-pic {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    object-fit: contain;
    object-position: center 15%;
    border: 5px solid #ff69b4;
    box-shadow: 0 0 20px #ff69b4, 0 0 50px rgba(255, 105, 180, 0.4);
    position: relative;
    z-index: 2;
}

.side-name {
    position: absolute;
    font-size: 68px;
    font-weight: 900;
    letter-spacing: 5px;
    color: rgba(255, 255, 255, 0.12);
    text-shadow: 0 0 20px rgba(255, 105, 180, 0.35);
    white-space: nowrap;
}

.left-name { right: 100%; margin-right: 5px; }
.right-name { left: 100%; margin-left: 5px; }

.overlay-role {
    position: absolute;
    bottom: 225px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 24px;
    border-radius: 30px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    z-index: 10;
    font-weight: 600;
    min-width: 220px;
    text-align: center;
}

.main-heading {
    font-size: 42px;
    margin-top: 10px;
    margin-bottom: 15px;
    text-align: center;
}

.hero-description {
    max-width: 650px;
    line-height: 1.8;
    opacity: 0.9;
    margin-top: 10px;
    text-align: center;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    z-index: 5;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    padding: 14px 32px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
    position: relative;
    z-index: 5;
    cursor: pointer;
}

.primary-btn, .secondary-btn {
    border: 2px solid #ff69b4;
    color: #ff69b4;
    background: transparent;
}

.primary-btn:hover, .secondary-btn:hover {
    background: #ff69b4;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 0 20px #ff69b4;
}


/* =========================================
   5. MATRIX GRID SYSTEM & BOX ISOLATIONS
========================================= */

.grid {
    width: 100%;
    max-width: 1100px;
    margin: 40px auto;
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 35px !important;
    padding: 0 20px;
}

.skill-wrapper,
.project-wrapper,
.contact-wrapper {
    display: block !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100%;
}


/* =========================================
   6. PREMIUM SEPARATE CARD STYLING
========================================= */

.project-card {
    width: 100% !important;
    min-height: 220px;
    padding: 55px 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-radius: 25px;
    font-size: 22px;
    font-weight: bold;
    color: white;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-12px) scale(1.04);
    border-color: #ff69b4;
    color: #ff69b4;
    box-shadow: 0 0 25px #ff69b4;
}


/* =========================================
   7. PAGE CONTAINER LAYOUTS
========================================= */

.page {
    min-height: calc(100vh - 80px) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 80px 20px !important;
}

.skills-section { background: rgba(15, 23, 42, 0.3); }
.projects-section { background: rgba(121, 59, 122, 0.2); }
.contact-page { background: rgba(15, 23, 42, 0.5); justify-content: center !important; }


/* =========================================
   8. BACK TO TOP OPTION BUTTON (STANDALONE)
========================================= */

.back-to-top-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    margin-bottom: 20px;
}

.back-to-top-btn {
    display: inline-block;
    padding: 14px 35px;
    border-radius: 30px;
    border: 2px solid #ff69b4;
    color: #ff69b4;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    background: transparent;
    transition: 0.3s ease-in-out;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 105, 180, 0.1);
}

.back-to-top-btn:hover {
    background: #ff69b4;
    color: white;
    transform: translateY(-4px);
    box-shadow: 0 0 25px #ff69b4;
}


/* =========================================
   9. GRID STRUCTURE FOR PRECISE ROWS
========================================= */

/* Desktop view (Sets precise balanced grids) */
@media (min-width: 992px) {
    .contact-grid {
        grid-template-columns: repeat(3, 1fr) !important; /* Holds 3 contact items in a row */
    }
}

/* Tablet view & Mid-Size Screens */
@media (max-width: 991px) and (min-width: 651px) {
    /* Since contact options are exactly 3, centers the last one on row 2 */
    .contact-page .grid .contact-wrapper:last-child {
        grid-column: span 2;
        justify-self: center;
        max-width: 320px;
    }
}

/* Mobile responsive layout structures */
@media (max-width: 650px) {
    .contact-page .grid {
        grid-template-columns: 1fr !important;
        justify-items: center !important;
        max-width: 340px !important;
        margin: 0 auto 20px auto !important;
        gap: 20px !important;
    }

    .contact-page .grid .contact-wrapper {
        grid-column: auto !important;
        width: 100% !important;
    }

    .contact-page .project-card {
        width: 100% !important;
        min-height: 140px !important;
        padding: 35px 20px !important;
        font-size: 18px;
    }
}


/* =========================================
   10. DETAILS SHEET SHEET PAGES
========================================= */

.project-detail-page {
    height: 100vh;
    overflow: hidden;
}

.project-detail-page .hero {
    height: calc(100vh - 80px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
}

.detail-card {
    width: 100% !important;
    max-width: 850px !important;
    padding: 25px 30px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
    box-shadow: 0 0 25px rgba(255, 105, 180, 0.15);
    text-align: left !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
}

.detail-title {
    font-size: 38px;
    margin-bottom: 12px;
    color: #ff69b4;
    text-align: center;
}

.detail-subtitle {
    font-size: 18px;
    opacity: 0.85;
    margin-bottom: 20px;
    text-align: center;
}

.detail-box {
    text-align: left;
    line-height: 1.6;
    margin-top: 12px;
}

.detail-box h3 {
    color: #ff69b4;
    margin-top: 16px;
    margin-bottom: 8px;
    font-size: 22px;
}

.detail-box p {
    opacity: 0.92;
    margin-bottom: 10px;
}

.detail-box ul {
    padding-left: 18px;
    line-height: 1.6;
}

.back-btn {
    display: block;
    width: max-content;
    margin: 18px auto 0 auto;
    padding: 12px 28px;
    border-radius: 30px;
    border: 2px solid #ff69b4;
    color: #ff69b4;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.back-btn:hover {
    background: #ff69b4;
    color: white;
    transform: translateY(-3px);
}


/* =========================================
   11. MEDIA BREAKPOINT ASSIGNMENTS
========================================= */

@media (max-width: 768px) {
    .navbar {
        padding: 0 20px !important;
        height: 70px;
    }

    .logo { font-size: 20px; }
    .navbar ul { gap: 15px !important; }
    .navbar ul li a { font-size: 14px; }

    .image-container { height: 300px; margin-top: 60px; }
    .profile-pic { width: 250px; height: 250px; border-width: 4px; }
    .side-name { font-size: 48px; letter-spacing: 3px; }

    .overlay-role {
        bottom: 170px;
        min-width: 180px;
        font-size: 14px;
        padding: 8px 20px;
    }

    .main-heading { font-size: 32px; }
    .hero-description { max-width: 500px; font-size: 15px; }
    .btn { padding: 12px 24px; font-size: 14px; }

    .grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 25px !important;
    }

    .project-card {
        min-height: 180px;
        padding: 40px 20px;
        font-size: 18px;
    }

    .page { padding: 60px 15px !important; }
    .detail-card { padding: 20px 20px; }
    .detail-title { font-size: 28px; }
    .detail-subtitle { font-size: 16px; }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0 15px !important;
        height: 60px;
    }

    .logo { font-size: 16px; }
    .navbar ul { gap: 10px !important; }
    .navbar ul li a { font-size: 12px; }

    .image-container { height: 200px; margin-top: 30px; }
    .profile-pic { width: 180px; height: 180px; border-width: 3px; }
    .side-name { font-size: 32px; letter-spacing: 2px; opacity: 0.08; }

    .overlay-role {
        bottom: 120px;
        min-width: 150px;
        font-size: 12px;
        padding: 6px 16px;
    }

    .main-heading { font-size: 24px; }
    .hero-description { max-width: 90%; font-size: 13px; }

    .grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }

    .project-card {
        min-height: 150px;
        padding: 30px 15px;
        font-size: 15px;
        border-radius: 15px;
    }

    .page { padding: 50px 12px !important; }
    .detail-card { padding: 15px 15px; }
    .detail-title { font-size: 22px; }
}

@media (max-width: 360px) {
    .navbar ul { gap: 8px !important; }
    .logo { font-size: 14px; }
    .navbar ul li a { font-size: 10px; }

    .profile-pic { width: 150px; height: 150px; }
    .side-name { font-size: 24px; }
    .overlay-role { bottom: 100px; min-width: 130px; }
    .main-heading { font-size: 20px; }

    .grid {
        grid-template-columns: 1fr !important;
    }
    
    .project-card { font-size: 14px; min-height: 130px; }
}