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

/* ===== BASE ===== */
* {
    font-family: 'Poppins', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    color: #333;
}

.btn {
    border-radius: 50px;
}

section {
    padding: 80px 0;
}

h2 {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 50px;
}

h3, h5 {
    font-weight: 600;
    color: #2c3e50;
}

/* ===== NAVBAR ===== */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
    padding: 1rem 0;
    transition: all 0.3s ease;
    background: white !important;
}

.navbar.scrolled {
    padding: 0.6rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, .12);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    transition: all 0.3s ease;
}

.navbar-brand i {
    color: black;
    margin-right: 8px;
}

.navbar-nav {
    gap: 0.5rem;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    color: #495057 !important;
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    width: calc(100% - 2rem);
    height: 2px;
    background: #007bff;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #007bff !important;
}

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

.navbar-toggler {
    border: none;
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
    background: rgba(0, 123, 255, 0.1);
}

.navbar-toggler-icon {
    width: 1.5rem;
    height: 1.5rem;
}

/* ===== HERO ===== */
.hero {
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
    color: white;
    padding: 120px 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero .btn-light {
    background-color: white;
    border-color: white;
    color: #2c3e50;
    font-weight: 500;
    transition: all 0.3s ease;
}

.hero .btn-light:hover {
    background-color: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

.hero .btn-outline-light {
    border-color: white;
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
}

.hero .btn-outline-light:hover {
    background-color: white;
    color: #2c3e50;
    transform: translateY(-2px);
}

/* ===== ABOUT ===== */
.about-img {
    width: 250px;
    height: 250px;
    object-fit: cover;
}

.about-placeholder {
    width: 250px;
    height: 250px;
}

/* ===== TIMELINE ===== */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 100%;
    background: #007bff;
    top: 0;
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 0 40px 40px;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    text-align: left;
}

.timeline-dot {
    position: absolute;
    top: 0;
    width: 16px;
    height: 16px;
    background: #007bff;
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 0 0 3px #007bff;
    z-index: 1;
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -8px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -8px;
}

.timeline-year {
    display: inline-block;
    background: #007bff;
    color: white;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.timeline-card {
    background: white;
    border-radius: 15px;
    padding: 20px 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-align: left;
}

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

.timeline-card h5 {
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.timeline-card p {
    margin-bottom: 4px;
    font-size: 0.9rem;
    color: #6c757d;
}

/* ===== SKILLS ===== */
.skill-bar {
    height: 15px;
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, #2c3e50 0%, #1a252f 100%);
    border-radius: 10px;
    transition: width 1.2s ease;
    box-shadow: 0 2px 5px rgba(44, 62, 80, 0.3);
    width: 0;
}

.skill-progress.animated {
    /* width is set via inline style */
}

.badge.bg-primary {
    background-color: #007bff !important;
    font-weight: 500;
}

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

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

.project-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

.project-card .card-body {
    display: flex;
    flex-direction: column;
}

.project-img-placeholder {
    height: 200px;
}

/* Project filters */
.filter-btn {
    border: 2px solid #2c3e50;
    color: #2c3e50;
    background: transparent;
    padding: 6px 20px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-btn:hover,
.filter-btn.active {
    background: #2c3e50;
    color: white;
}

.project-item {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.project-item.hidden {
    opacity: 0;
    transform: scale(0.95);
    position: absolute;
    pointer-events: none;
}

/* ===== CONTACT FORM ===== */
.contact-card {
    transition: all 0.3s ease;
}

.contact-card:last-child {
    margin-bottom: 0 !important;
    flex-grow: 1;
}

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

.contact-card a:hover {
    color: #007bff !important;
    text-decoration: underline !important;
}

.contact-form .form-control {
    border: 1px solid #dee2e6;
    padding: 12px 16px;
    border-radius: 10px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.15);
}

.contact-form textarea.form-control {
    resize: none;
    min-height: 100px;
}

/* ===== PROJECT DETAIL (show) ===== */
.project-hero {
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
    padding: 2rem 0;
}

.project-image {
    max-height: 500px;
    width: 100%;
    object-fit: cover;
}

.info-card-header {
    background-color: #2c3e50;
}

/* ===== FOOTER ===== */
footer {
    background: #343a40;
    color: white;
    padding: 50px 0 30px;
    margin-top: 50px;
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
}

.footer-brand {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: inline-block;
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2.5rem;
    font-size: 0.95rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: #007bff;
    transition: width 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.footer-links a:hover::after {
    width: 100%;
}

.footer-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 2.5rem 0 1.5rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 1rem;
}

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

.admin-link {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
}

.admin-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.admin-link i {
    margin-right: 0.4rem;
}

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    cursor: pointer;
}

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

.back-to-top:hover {
    background: #007bff;
    transform: translateY(-3px);
}

/* ===== 404 ===== */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
    color: white;
}

.error-code {
    font-size: 8rem;
    font-weight: 700;
    line-height: 1;
    opacity: 0.3;
}

/* ===== ANIMATIONS (subtiles) ===== */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991px) {
    .navbar-collapse {
        padding: 1rem 0;
        margin-top: 1rem;
        border-top: 1px solid rgba(0, 0, 0, .05);
    }

    .nav-link {
        padding: 0.75rem 1rem !important;
        margin: 0.2rem 0 !important;
    }

    .nav-link::after {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 80px 0;
        min-height: auto;
    }

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

    .hero .lead {
        font-size: 1rem;
    }

    section {
        padding: 50px 0;
    }

    .btn-lg {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item,
    .timeline-item:nth-child(even) {
        width: 100%;
        left: 0;
        text-align: left;
        padding: 0 20px 30px 50px;
    }

    .timeline-item:nth-child(odd) {
        text-align: left;
    }

    .timeline-dot,
    .timeline-item:nth-child(odd) .timeline-dot,
    .timeline-item:nth-child(even) .timeline-dot {
        left: 12px;
        right: auto;
    }

    footer {
        padding: 40px 0 25px;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

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

    .project-image {
        max-height: 300px;
    }

    .display-4 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 1.5rem;
    }

    .btn-lg {
        width: 100%;
        margin-bottom: 10px;
    }

    .btn-lg.me-3 {
        margin-right: 0 !important;
    }

    .display-4 {
        font-size: 1.5rem;
    }

    .project-image {
        max-height: 250px;
    }

    .about-img,
    .about-placeholder {
        width: 180px;
        height: 180px;
    }
}
