/* Custom Styling for Bootstrap CV Portfolio */

:root {
    --primary-color: #764ba2;
    --primary-dark: #141621;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --dark-color: #212529;
    --light-color: #f8f9fa;
}

/* Gradient backgrounds */
.bg-gradient {
    background: linear-gradient(135deg, #141621 0%, #764ba2 100%);
}

/* Hero Section */
.hero-section {
    padding-top: 80px;
    padding-bottom: 80px;
    position: relative;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgb(20 22 33 / 85%) 0%, rgba(118, 75, 162, 0.85) 100%);
    z-index: 1;
}

.hero-section h1 {
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.hero-section p.lead {
    font-weight: 500;
    opacity: 0.95;
}

/* Section Titles */
.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #764ba2 0%, #141621 100%);
    border-radius: 2px;
}

/* Card Styling */
.card {
    transition: all 0.3s ease;
    border-left: 4px solid #764ba2 !important;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

.card-title {
    color: #212529;
    margin-bottom: 0.5rem;
}

.card-body ul {
    padding-left: 0;
    list-style: none;
}

.card-body ul li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Badge Styling */
.badge {
    font-size: 0.85rem;
    padding: 0.6rem 0.8rem;
    font-weight: 500;
    border-radius: 50px;
    letter-spacing: 0.3px;
}

.badge.bg-primary {
    background-color: #764ba2 !important;
    color: white;
}

.badge.bg-success {
    background-color: #198754 !important;
    color: white;
}

.badge.bg-info {
    background-color: #0dcaf0 !important;
}

.badge.bg-secondary {
    background-color: #6c757d !important;
    color: white;
}

/* Override Bootstrap primary colors */
.text-primary {
    color: var(--primary-color) !important;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.btn-primary:hover {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
}

/* Timeline styling */
.timeline {
    position: relative;
}

.timeline .card {
    margin-bottom: 2rem;
    border-radius: 8px;
}

.timeline .card:last-child {
    margin-bottom: 0;
}

/* Button Styling */
.btn-lg {
    padding: 0.75rem 1.75rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: white;
}

/* Card action buttons */
.card-actions {
    margin-top: 0.75rem;
}
.card-actions .btn {
    border-radius: 8px;
    padding: 0.35rem 0.7rem;
    font-weight: 600;
}
.card-actions .btn + .btn {
    margin-left: 0.5rem;
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.5rem;
}

.typed {
    font-weight: 500;
    letter-spacing: 0.5px;
    display: inline-block;
    transform: translateY(3px);
}

.nav-link {
    margin-left: 1rem;
    font-weight: 500;
    transition: color 0.3s ease, border 0.3s ease, border-radius 0.3s ease;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 0.5rem 0.75rem !important;
    color: white !important;
}

.nav-link:hover {
    color: var(--primary-color) !important;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
}

#pdf-download {
    border: 1px solid white;
    border-radius: 8px;
}

#pdf-download:hover {
    color: var(--primary-color) !important;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
}

/* Image styling */
img.rounded-circle {
    max-width: 300px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 25% !important;
}

.border-5 {
    border-width: 2px !important;
}

/* Text utilities */
.text-muted {
    color: #6c757d !important;
    line-height: 1.8;
}

/* Subtle Divider */
.subtle-divider {
    border: none;
    border-top: 1px solid darkslategray;
}

/* Footer */
footer {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

footer p {
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.8);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .section-title {
        font-size: 1.8rem;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .hero-section p.lead {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding-top: 60px;
        padding-bottom: 60px;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .d-flex.gap-3 {
        gap: 0.5rem !important;
    }

    .btn-lg {
        padding: 0.6rem 1.2rem;
        font-size: 0.95rem;
    }

    img.rounded-circle {
        max-width: 250px;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .hero-section h1 {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .badge {
        font-size: 0.8rem;
        padding: 0.5rem 0.7rem;
    }

    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        width: 100%;
    }

    .d-flex.gap-4 {
        gap: 0.5rem !important;
    }
}

/* Timeline header responsiveness: keep badges and action button inside the card */
.timeline .card .card-body .justify-content-between {
    flex-wrap: wrap;
    gap: 0.5rem;
}

.timeline .card .card-body .justify-content-between > div:first-child {
    min-width: 0; /* allow the left column to shrink on small screens */
}

.timeline .card .card-body .d-flex.align-items-center {
    gap: 0.5rem;
}

.timeline .card .card-body .d-flex.align-items-center .badge {
    white-space: nowrap;
}

@media (max-width: 576px) {
    .timeline .card .card-body .d-flex.align-items-center {
        width: 100%;
        justify-content: flex-start;
    }

    .timeline .card .card-body .d-flex.align-items-center .btn {
        margin-left: 0.4rem;
    }
}

/* Education cards: keep action button on one line on larger screens, allow wrapping on small screens */
#education .card .card-body .d-flex.align-items-center {
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.75rem;
}

#education .card .card-body .ms-auto {
    margin-left: auto;
}

#education .card .card-body .ms-auto .btn {
    white-space: nowrap;
    flex-shrink: 0;
}

@media (max-width: 576px) {
    #education .card .card-body .d-flex.align-items-center {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    #education .card .card-body .ms-auto {
        width: 100%;
        margin-left: 0;
        margin-top: 0.5rem;
    }

    #education .card .card-body .ms-auto .btn {
        white-space: normal;
        width: 100%;
    }
}