/* 
* Custom CSS for Souvik Chaudhury Portfolio
* Built with Bootstrap 5
*/

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --gray: #6c757d;
    --border-radius: 6px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    overflow-x: hidden;
    position: relative;
}

/* ===== COMMON STYLES ===== */
.section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--primary-color);
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--secondary-color);
    margin: 15px auto;
}

.bg-light {
    background-color: var(--light-bg) !important;
}

/* Button Styling */
.btn-primary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #2980b9;
    border-color: #2980b9;
}

.btn-outline-light:hover {
    color: var(--secondary-color);
}

/* ===== HEADER / NAVBAR ===== */
.navbar {
    background-color: var(--primary-color);
    padding: 15px 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 10px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    display: flex;
    align-items: center;
}

.logo-image {
    height: 50px;
    transition: transform 0.3s ease;
}

.navbar-brand:hover .logo-image {
    transform: scale(1.1);
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    padding: 10px 15px;
    position: relative;
    transition: all 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    color: var(--secondary-color);
}

.navbar-dark .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15px;
    right: 15px;
    height: 2px;
    background-color: var(--secondary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover::after,
.navbar-dark .navbar-nav .nav-link.active::after {
    transform: scaleX(1);
}

/* ===== HERO SECTION ===== */
.hero {
    height: 100vh;
    min-height: 500px;
    padding-top: 80px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #34495e 100%);
    color: var(--white);
    display: flex;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #ecf0f1;
}

.hero-text {
    margin-bottom: 30px;
    font-size: 1.1rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.hero-image-container {
    max-width: 400px;
    margin: 0 auto;
}

.hero-image {
    border-radius: 50%;
    border: 5px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* ===== ABOUT SECTION ===== */
.about-title {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.about-text {
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.info-icon {
    width: 45px;
    height: 45px;
    background-color: var(--secondary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
    font-size: 1.2rem;
}

.info-item h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.info-item p {
    margin-bottom: 0;
}

/* Skills */
.skills-section {
    background-color: #fff;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.progress {
    height: 10px;
    border-radius: 5px;
    background-color: #e9ecef;
}

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

.skill-name span:last-child {
    font-weight: 600;
}

/* ===== EXPERIENCE SECTION ===== */
.timeline-wrapper {
    position: relative;
    padding: 30px 0;
}

.timeline-wrapper::before {
    content: '';
    position: absolute;
    left: 50%;
    width: 4px;
    height: 100%;
    background: var(--secondary-color);
    transform: translateX(-50%);
}

.timeline-block {
    position: relative;
    margin: 60px 0;
}

.timeline-block::after {
    content: '';
    display: table;
    clear: both;
}

.timeline-content {
    position: relative;
    width: 45%;
    margin-left: auto;
    margin-right: auto;
    padding: 25px;
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
}

.timeline-block:nth-child(odd) .timeline-content {
    margin-right: 55%;
}

.timeline-block:nth-child(even) .timeline-content {
    margin-left: 55%;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 20px;
    width: 20px;
    height: 20px;
    background: var(--white);
    border: 4px solid var(--secondary-color);
    border-radius: 50%;
    z-index: 1;
}

.timeline-block:nth-child(odd) .timeline-content::before {
    right: -60px;
}

.timeline-block:nth-child(even) .timeline-content::before {
    left: -60px;
}

.timeline-date {
    color: var(--gray);
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.timeline-title {
    font-size: 1.3rem;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.timeline-company {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.timeline-description ul {
    padding-left: 20px;
    margin-bottom: 0;
}

.timeline-description li {
    margin-bottom: 8px;
}

/* ===== PROJECTS SECTION ===== */
.project-card {
    border: none;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.project-image {
    height: 200px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card-title {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tag {
    padding: 5px 10px;
    background-color: var(--light-bg);
    border-radius: 20px;
    font-size: 0.8rem;
}

/* Screenshot Slider */
.screenshot-slider {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.slider-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.4s ease;
}

.slider-image {
    min-width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.slider-nav {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 10px;
    z-index: 10;
    pointer-events: none;
}

.slider-prev, .slider-next, .slider-dot {
    pointer-events: auto;
}

.slider-prev, .slider-next {
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s;
    z-index: 11;
    padding: 0;
}

.slider-prev:hover, .slider-next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.slider-dots {
    display: flex;
    justify-content: center;
    margin: 0 10px;
    flex-grow: 1;
    pointer-events: auto;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    margin: 0 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.slider-dot.active {
    background-color: var(--secondary-color);
}

/* App Store Buttons */
.official-app-store-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.store-button {
    display: inline-block;
    transition: transform 0.3s ease;
}

.store-button:hover {
    transform: translateY(-3px);
}

.store-button img {
    height: 40px;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border: 2px solid white;
}

.lightbox-caption {
    color: white;
    text-align: center;
    padding: 10px;
    font-size: 1rem;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 30px;
    color: white;
    cursor: pointer;
    z-index: 1101;
}

.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 1.5rem;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover, .lightbox-next:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

/* ===== EDUCATION SECTION ===== */
.education-card {
    border: none;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.education-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.education-date {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.education-degree {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.education-school {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.education-location {
    display: flex;
    align-items: center;
    color: var(--gray);
    font-size: 0.95rem;
}

.education-location i {
    margin-right: 8px;
}

/* ===== ACHIEVEMENTS SECTION ===== */
.achievement-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.achievement-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.achievement-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.achievement-title {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.achievement-description {
    color: var(--text-color);
    font-size: 0.95rem;
}

/* ===== CONTACT SECTION ===== */
.contact-info {
    background-color: var(--white);
    border-radius: var(--border-radius);
    height: 100%;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background-color: var(--secondary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
}

.contact-form {
    background-color: var(--white);
    border-radius: var(--border-radius);
}

.form-control {
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius);
}

.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* ===== FOOTER ===== */
.footer {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
}

.footer-social {
    margin-bottom: 30px;
}

.social-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-radius: 50%;
    margin: 0 10px;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: var(--secondary-color);
    transform: translateY(-5px);
}

.footer-text {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-link {
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-link:hover {
    color: var(--secondary-color);
}

.copyright {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Back to top button */
.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 44px;
    height: 44px;
    background-color: var(--secondary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
}

/* ===== ANIMATIONS ===== */
.animated {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 992px) {
    .section {
        padding: 80px 0;
    }
    
    .hero {
        height: auto;
        padding: 100px 0 50px;
    }
    
    .hero-image-container {
        margin: 50px auto 0;
    }
    
    .timeline-wrapper::before {
        left: 30px;
    }
    
    .timeline-content {
        width: calc(100% - 80px);
        margin-left: 80px !important;
        margin-right: 0 !important;
    }
    
    .timeline-block:nth-child(odd) .timeline-content::before,
    .timeline-block:nth-child(even) .timeline-content::before {
        left: -50px;
        right: auto;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .about-title {
        font-size: 1.8rem;
    }
    
    .timeline-content {
        padding: 20px;
    }
    
    .timeline-title {
        font-size: 1.2rem;
    }
    
    .timeline-company {
        font-size: 1rem;
    }
    
    .achievement-icon {
        font-size: 2.5rem;
    }
    
    .achievement-title {
        font-size: 1.2rem;
    }
    
    .education-degree {
        font-size: 1.2rem;
    }
    
    .education-school {
        font-size: 1rem;
    }
    
    .footer-social .social-icon {
        width: 35px;
        height: 35px;
        margin: 0 5px;
    }
}

@media (max-width: 576px) {
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-text {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-buttons .btn {
        width: 100%;
        margin-left: 0 !important;
        margin-bottom: 10px;
    }
    
    .info-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .info-item h4 {
        font-size: 1rem;
    }
    
    .timeline-content {
        width: calc(100% - 50px);
        margin-left: 50px !important;
        padding: 15px;
    }
    
    .timeline-wrapper::before {
        left: 15px;
    }
    
    .timeline-block:nth-child(odd) .timeline-content::before,
    .timeline-block:nth-child(even) .timeline-content::before {
        left: -35px;
        width: 15px;
        height: 15px;
    }
    
    .timeline-description ul {
        padding-left: 15px;
    }
    
    .achievement-icon {
        font-size: 2rem;
    }
    
    .achievement-title {
        font-size: 1.1rem;
    }
    
    .official-app-store-buttons {
        justify-content: center;
    }
    
    .store-button img {
        height: 35px;
    }
    
    .footer-text {
        font-size: 1rem;
    }
    
    .footer-links {
        flex-direction: column;
    }
    
    .footer-link {
        margin: 5px 0;
    }
    
    .back-to-top {
        right: 20px;
        bottom: 20px;
        width: 40px;
        height: 40px;
    }
}

/* For Extra Small Devices */
@media (max-width: 375px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .timeline-title {
        font-size: 1.1rem;
    }
    
    .timeline-company {
        font-size: 0.9rem;
    }
    
    .timeline-description li {
        font-size: 0.9rem;
    }
    
    .contact-icon {
        width: 40px;
        height: 40px;
    }
}

/* Animation for AOS */
[data-aos] {
    opacity: 0;
    transition-property: opacity, transform;
}

[data-aos].aos-animate {
    opacity: 1;
}

[data-aos="fade-up"] {
    transform: translateY(50px);
}

[data-aos="fade-right"] {
    transform: translateX(-50px);
}

[data-aos="fade-left"] {
    transform: translateX(50px);
}

[data-aos="zoom-in"] {
    transform: scale(0.9);
}

[data-aos="flip-up"] {
    transform: perspective(1000px) rotateX(-10deg);
}

[data-aos].aos-animate {
    transform: translateY(0) translateX(0) scale(1) rotateX(0);
}


/* Fix for mobile right gap/overflow */
html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* Fix for potential Bootstrap row overflow */
.row {
    margin-right: 0;
    margin-left: 0;
}

/* Fix for container potential overflow on very small screens */
.container {
    max-width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

/* Ensure project cards don't cause overflow */
.project-card {
    max-width: 100%;
}

/* Ensure images don't break out of containers */
img {
    max-width: 100%;
    height: auto;
}

/* Fix for potential navbar overflow */
.navbar {
    width: 100%;
    max-width: 100vw;
}

/* Fix for any absolute positioned elements that might cause overflow */
.slider-nav, 
.lightbox-prev, 
.lightbox-next,
.back-to-top {
    box-sizing: border-box;
}

/* Additional fix for row gutters potentially causing overflow */
.g-4 {
    --bs-gutter-x: 1rem;
}

@media (max-width: 576px) {
    .g-4 {
        --bs-gutter-x: 0.5rem;
    }
    
    /* Reduce padding for container on very small screens */
    .container {
        padding-right: 10px;
        padding-left: 10px;
    }
}