@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;700;900&display=swap');

:root {
    --primary-color: #9861ff; /* Pink from image */
    --primary-dark: #7240cf; /* Pink from image */
    --secondary-color: #333;
    --background-color: #fff;
    --text-color: #000;
    --accent-color: #4a90e2; /* Blue for the dot */
    --border-color: #FDB813; /* A more golden-yellow border */
}

body, html {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
}

body.nav-open {
    overflow: hidden;
}

.page-wrapper {
    background-color: var(--background-color);
    height: 100vh;
    position: relative;
    overflow: hidden;
    transition: transform 0.5s ease, border-radius 0.5s ease;
    box-sizing: border-box;
}

body.nav-open .page-wrapper {
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

body.nav-open::before, body.nav-open::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: -1;
    transition: transform 0.5s ease;
    border-radius: 20px;
}

body.nav-open::before {
    transform: translateY(5vh) scale(0.85);
    background-color: #f0f0f0;
}

body.nav-open::after {
    transform: translateY(0vh) scale(0.9);
    background-color: #e6e6e6;
}

/* Header */
.header {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
}

.logo-container {
    display: flex;
}

.logo {
    background-color: var(--primary-color);
    color: var(--background-color);
    padding: 10px 50px;
    font-weight: 700;
    letter-spacing: 2px;
    font-size: 30px;
    display: flex;
    align-items: center;
}

.menu-toggle {
    background-color: var(--secondary-color);
    border: none;
    padding: 17px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    height: 65px;
    width: 65px;
}

.menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: var(--background-color);
    transition: all 0.3s ease;
    border-radius: 3px;
}

.menu-toggle.open .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.menu-toggle.open .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.open .bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

.nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1a2332;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    z-index: 999;
}

.nav-menu.open {
    opacity: 1;
    visibility: visible;
}

.nav-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: center;
}

.nav-menu li {
    margin: 20px 0;
}

.nav-menu li a {
    color: #fff;
    text-decoration: none;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 2px;
    transition: color 0.3s ease;
}

.nav-menu li a.active, .nav-menu li a:hover {
    color: var(--primary-color);
}

/* Main Content */
.main-content {
    height: 100%;
    width: 100%;
    position: relative;
}

.side-image-container {
    position: relative;
    height: 100%;
}

.side-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0s 0.5s;
    background-color: var(--primary-color);
}

.side-image.active {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

.image-overlay-content {
    position: absolute;
    bottom: 50px;
    left: 50px;
    display: flex;
    align-items: center;
    color: white;
}

.vertical-line {
    width: 4px;
    height: 100px;
    background-color: white;
    margin-right: 20px;
}

.overlay-text {
    font-size: 2.5rem;
    font-weight: 700;
}

.hero-image {
    height: 100%;
    overflow: hidden;
}

.profile-pic {
    width: 100%;
    height: 100%;
    object-fit: cover; /* This makes the image cover the container, similar to background-size: cover */
}

.content-side {
    display: block; /* Override flex centering */
    height: 100vh;
    overflow-y: auto; /* Enable scrolling only for portfolio */
}

/* --- Section-Specific Layout Overrides --- */
body.home-active .content-side {
    display: flex;
    align-items: center;
    padding: 50px;
    position: relative;
}

.content-inner {
    width: 100%; /* This is the key fix */
    text-align: left;
}

.page-section {
    display: none;
}

.page-section.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hello-text {
    display: flex;
    align-items: center;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.hello-icon {
    width: 20px;
    height: 20px;
    background-color: var(--primary-color);
    border-radius: 50%;
    margin-right: 10px;
}

.name-text {
    font-size: 3.5rem;
    font-weight: 900;
    margin: 0;
    line-height: 1.2;
    position: relative;
    display: inline-block;
}

.blue-dot {
    width: 15px;
    height: 15px;
    background-color: var(--primary-color);
    border-radius: 50%;
    position: absolute;
    bottom: 0;
    right: -5px;
}

.role-text {
    font-size: 2rem;
    font-weight: 500;
    color: #747474;
    margin-top: 10px;
    letter-spacing: 2px;
}

.role-text .cursor {
    font-weight: 500;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    from, to {
        color: transparent;
    }
    50% {
        color: #888;
    }
}

.btn-download-cv {
    background-color: var(--primary-color);
    color: var(--background-color);
    padding: 12px 25px;
    text-decoration: none;
    font-weight: 700;
    display: inline-block;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.btn-download-cv:hover {
    background-color: var(--primary-dark);
    color: var(--background-color);
}

/* Social Icons */
.social-icons {
    position: absolute;
    bottom: 50px;
    right: 30px;
    display: flex;
}

.social-icons a {
    color:var(--background-color);
    margin-left: 15px;
    font-size: 1rem;
    transition: color 0.3s ease;
    background-color: var(--primary-color);
    padding: 15px;
    border-radius: 50px;
    width: 50px;
    height: 50px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    text-decoration: none;
}

.social-icons a:hover {
    color: var(--primary-color);
    background-color: var(--background-color);
    border: 1px solid var(--primary-color);
}

/*-----------------------------------------------------
    [ Preloader ]
-----------------------------------------------------*/
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #1a1a1a; /* Match background */
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid var(--secondary-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

#preloader.hidden {
    opacity: 0;
    pointer-events: none; /* Make it unclickable */
}

/*-----------------------------------------------------
    [ Responsive ]
-----------------------------------------------------*/
/* About Section Styles */
#about {
    padding: 2rem;
}

.section-title-container {
    margin-bottom: 2rem;
}

.section-subtitle {
    color: #888;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 2px;
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 2px 8px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-top: 5px;
}

.title-underline {
    width: 50px;
    height: 4px;
    background-color: var(--primary-color);
}

.about-profile-pic {
    border: 10px solid #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);

}

.about-details-col h3 {
    font-weight: 700;
    margin-bottom: 1rem;
}

.services-grid {
    margin-top: 2rem;
}

.service-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.service-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 15px;
    width: 40px;
    text-align: center;
}

.service-item h5 {
    font-size: 1.1rem;
    font-weight: 700;
}

.service-item p {
    font-size: 0.9rem;
    color: #888;
    margin: 0;
}

.stats-bar {
    border-top: 1px solid #eee;
    margin-top: 2rem;
    padding-top: 2rem;
    text-align: center;
}

.stat-item .fas, .stat-item .far {
    font-size: 2rem;
    color: var(--primary-color);
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 0.5rem;
}

.stat-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: #888;
    letter-spacing: 1px;
}


/* Resume Section Styles */
#resume {
    padding: 2rem;
}

.resume-timeline {
    position: relative;
}

.timeline-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    position: relative;
    padding-left: 20px;
}

.timeline-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background-color: var(--primary-color);
    border-radius: 50%;
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    padding-bottom: 30px;
    border-left: 2px solid #eee;
}

.timeline-item:last-child {
    border-left: 2px solid transparent;
    padding-bottom: 0;
}

.timeline-icon {
    position: absolute;
    left: -25px;
    top: 0;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 5px solid white;
}

.timeline-item h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.timeline-date {
    font-size: 0.8rem;
    font-weight: 500;
    color: #888;
    margin-bottom: 10px;
}

.skills-section {
    margin-top: 3rem;
}

.skills-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.skill-item {
    margin-bottom: 1.5rem;
}

.skill-name, .skill-percent {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--secondary-color);
    display: inline-block;
    margin-bottom: 5px;
}

.skill-percent {
    float: right;
}

.progress {
    height: 8px;
    border-radius: 4px;
    background-color: #eee;
}

.progress-bar {
    background-color: var(--primary-color);
}


/* Portfolio Section Styles */
#portfolio {
    padding: 2rem;
}

.portfolio-filter {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    display: flex;
    justify-content: center;
}

.portfolio-filter .filter-item {
    cursor: pointer;
    padding: 10px 20px;
    margin: 0 5px;
    background-color: #000;
    color: #fff;
    font-weight: 700;
    clip-path: polygon(0 0, 100% 0, 90% 100%, 10% 100%);
    transition: background-color 0.3s ease;
}

.portfolio-filter .filter-item.active {
    background-color: var(--primary-color);
}

/* --- Final, Definitive, and Corrected Flexbox Portfolio --- */
.portfolio-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* This will now work correctly */
    gap: 30px;
    margin-top: 2rem;
}

.portfolio-item {
    flex: 0 1 320px; /* A fixed basis for consistent sizing */
    box-sizing: border-box;
    transition: opacity 0.3s ease;
}

.portfolio-item.hidden {
    display: none;
}

.portfolio-item-inner {
    background: #fff;
    border: 1px solid #e9e9e9;
    border-radius: 4px;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-item-inner:hover {
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(0,0,0,0.07);
}

.portfolio-image {
    height: 240px; /* Set a fixed height for all image containers */
    overflow: hidden; /* Hide parts of the image that overflow */
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the container, cropping if necessary */
    display: block;
    transition: transform 0.3s ease-in-out;
}

.portfolio-item-inner:hover .portfolio-image img {
    transform: scale(1.05);
}

.portfolio-details {
    padding: 20px 25px;
    text-align: left;
    border-top: 1px solid #e9e9e9;
}

.portfolio-details h5 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #333;
    font-weight: 600;
}

.portfolio-details p {
    font-size: 0.9rem;
    color: #888;
    text-transform: none;
    letter-spacing: 0;
}

/* --- Contact Section Styles --- */
.say-something-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form .form-control {
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    padding: 15px;
    font-size: 0.9rem;
    color: #555;
    background-color: #f8f9fa;
    transition: border-color 0.3s ease;
}

.contact-form .form-control:focus {
    box-shadow: none;
    border-color: var(--primary-color);
    background-color: #fff;
}

.btn-send-message {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 15px 30px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.btn-send-message:hover {
    background-color: var(--primary-dark); /* A slightly darker shade */
}
#contact{
    padding: 2rem;
}

.contact-info-row {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #e8e8e8;
}

.contact-info-box {
    text-align: center;
    padding: 20px;
}

.contact-info-box .contact-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.contact-info-box h5 {
    font-size: 1rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.contact-info-box p {
    font-size: 0.9rem;
    color: #888;
    line-height: 1.6;
}

@media (max-width: 991.98px) {
    .page-wrapper {
        border: none;
        height: auto;
        min-height: 100vh;
    }

    .main-content {
        height: auto;
        width: 100%;
        position: static;
    }

    .content-side {
        min-height: 100vh;
        padding: 80px 30px 80px 30px; /* Add padding for header and social icons */
    }

    .name-text {
        font-size: 2.5rem;
    }

    .social-icons {
        bottom: 30px;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        text-align: center;
    }

    .social-icons a {
        margin: 0 10px;
    }

    .about-image-col{
        margin-bottom: 20px;
    }

    .logo{
        padding: 10px 35px;
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .contact-info-box:not(:last-child) {
        border-right: 1px solid #e8e8e8;
    }

    #about{
        padding: 0;
    }

    .portfolio-filter{
        flex-direction: column;
        gap: 10px;
    }

    .portfolio-filter .filter-item{
        text-align: center;
    }

}
