/* ============================================================
   ProjectsGuru Portfolio - Main Stylesheet
   Brand Colors: Blue #2B59A2 | Green #3E8E41
   ============================================================ */

:root {
    --pg-blue: #2B59A2;
    --pg-blue-dark: #1e3f75;
    --pg-green: #3E8E41;
    --pg-green-dark: #2d6b30;
    --pg-black: #1a1a2e;
    --pg-gray-100: #f8f9fc;
    --pg-gray-200: #e9ecef;
    --pg-gray-300: #dee2e6;
    --pg-gray-600: #6c757d;
    --pg-gray-800: #343a40;
    --pg-white: #ffffff;
    --pg-shadow: 0 4px 20px rgba(43, 89, 162, 0.1);
    --pg-shadow-lg: 0 10px 40px rgba(43, 89, 162, 0.15);
    --pg-radius: 12px;
    --pg-transition: all 0.3s ease;
    --pg-font-heading: 'Playfair Display', Georgia, serif;
    --pg-font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

[data-theme="dark"] {
    --pg-black: #e8e8f0;
    --pg-gray-100: #0f0f1a;
    --pg-gray-200: #1a1a2e;
    --pg-gray-300: #2a2a40;
    --pg-gray-600: #a0a0b8;
    --pg-gray-800: #d0d0e0;
    --pg-white: #12121f;
    --pg-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --pg-shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.4);
}

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--pg-font-body);
    color: var(--pg-black);
    background-color: var(--pg-white);
    line-height: 1.7;
    transition: var(--pg-transition);
}

h1, h2, h3, h4, h5 {
    font-family: var(--pg-font-heading);
    font-weight: 700;
    line-height: 1.3;
}

a { color: var(--pg-blue); text-decoration: none; transition: var(--pg-transition); }
a:hover { color: var(--pg-green); }

/* ---- Navbar ---- */
.navbar-pg {
    background: var(--pg-white);
    box-shadow: var(--pg-shadow);
    padding: 0.75rem 0;
    transition: var(--pg-transition);
}

.navbar-pg .navbar-brand img { height: 50px; }

.navbar-pg .nav-link {
    color: var(--pg-gray-800);
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    position: relative;
}

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

.navbar-pg .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: var(--pg-green);
    border-radius: 2px;
}

.btn-hire {
    background: var(--pg-green);
    color: #fff !important;
    border-radius: 50px;
    padding: 0.5rem 1.5rem !important;
    font-weight: 600;
}

.btn-hire:hover { background: var(--pg-green-dark); color: #fff !important; }

.theme-toggle {
    background: none;
    border: 2px solid var(--pg-gray-300);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--pg-gray-800);
    transition: var(--pg-transition);
}

.theme-toggle:hover { border-color: var(--pg-blue); color: var(--pg-blue); }

/* ---- Hero Section ---- */
.hero-section {
    min-height: 90vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--pg-gray-100) 0%, var(--pg-white) 50%, rgba(43, 89, 162, 0.05) 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(43, 89, 162, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-tagline {
    color: var(--pg-green);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin: 1rem 0;
}

.hero-title .text-blue { color: var(--pg-blue); }

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--pg-gray-600);
    max-width: 550px;
    margin-bottom: 2rem;
}

.btn-primary-pg {
    background: var(--pg-blue);
    border: none;
    color: #fff;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--pg-transition);
}

.btn-primary-pg:hover {
    background: var(--pg-blue-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--pg-shadow-lg);
}

.btn-outline-pg {
    border: 2px solid var(--pg-blue);
    color: var(--pg-blue);
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    background: transparent;
    transition: var(--pg-transition);
}

.btn-outline-pg:hover {
    background: var(--pg-blue);
    color: #fff;
    transform: translateY(-2px);
}

.btn-green-pg {
    background: var(--pg-green);
    border: none;
    color: #fff;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--pg-transition);
}

.btn-green-pg:hover { background: var(--pg-green-dark); color: #fff; }

/* ---- Section Styles ---- */
.section-padding { padding: 5rem 0; }

.section-title {
    font-size: clamp(2rem, 3vw, 2.75rem);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--pg-gray-600);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.section-badge {
    display: inline-block;
    background: rgba(43, 89, 162, 0.1);
    color: var(--pg-blue);
    padding: 0.35rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.bg-light-pg { background: var(--pg-gray-100); }

/* ---- Stats Counter ---- */
.stat-card {
    text-align: center;
    padding: 2rem;
    background: var(--pg-white);
    border-radius: var(--pg-radius);
    box-shadow: var(--pg-shadow);
    transition: var(--pg-transition);
}

.stat-card:hover { transform: translateY(-5px); box-shadow: var(--pg-shadow-lg); }

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--pg-blue), var(--pg-green));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: #fff;
    font-size: 1.5rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--pg-blue);
    font-family: var(--pg-font-heading);
}

.stat-label { color: var(--pg-gray-600); font-weight: 500; }

/* ---- Cards ---- */
.pg-card {
    background: var(--pg-white);
    border-radius: var(--pg-radius);
    box-shadow: var(--pg-shadow);
    overflow: hidden;
    transition: var(--pg-transition);
    height: 100%;
    border: 1px solid var(--pg-gray-200);
}

.pg-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--pg-shadow-lg);
}

.pg-card-img {
    height: 220px;
    object-fit: cover;
    width: 100%;
}

.pg-card-img-link {
    display: block;
    text-decoration: none;
    overflow: hidden;
}

.pg-card-img-link:hover .pg-card-img {
    transform: scale(1.05);
}

.pg-card-img-link .pg-card-img {
    transition: transform 0.3s ease;
}

.pg-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.pg-card-title a:hover {
    color: var(--pg-blue);
}

.pg-card-body { padding: 1.5rem; }

.pg-card-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.pg-card-text { color: var(--pg-gray-600); font-size: 0.95rem; }

/* ---- Service Cards ---- */
.service-card {
    padding: 2rem;
    text-align: center;
    border-radius: var(--pg-radius);
    background: var(--pg-white);
    box-shadow: var(--pg-shadow);
    transition: var(--pg-transition);
    height: 100%;
    border: 1px solid var(--pg-gray-200);
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--pg-blue);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(43, 89, 162, 0.1), rgba(62, 142, 65, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1.75rem;
    color: var(--pg-blue);
}

/* ---- Skills ---- */
.skill-bar {
    margin-bottom: 1.5rem;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.skill-progress {
    height: 10px;
    background: var(--pg-gray-200);
    border-radius: 10px;
    overflow: hidden;
}

.skill-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--pg-blue), var(--pg-green));
    border-radius: 10px;
    transition: width 1.5s ease;
    width: 0;
}

/* ---- Testimonials ---- */
.testimonial-card {
    padding: 2rem;
    background: var(--pg-white);
    border-radius: var(--pg-radius);
    box-shadow: var(--pg-shadow);
    height: 100%;
    position: relative;
}

.testimonial-card::before {
    content: '\201C';
    font-size: 4rem;
    color: var(--pg-blue);
    opacity: 0.2;
    position: absolute;
    top: 10px;
    left: 20px;
    font-family: Georgia, serif;
    line-height: 1;
}

.testimonial-rating { color: #ffc107; margin-bottom: 1rem; }

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.testimonial-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pg-blue), var(--pg-green));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
}

/* ---- Blog ---- */
.blog-sidebar .pg-card {
    height: auto;
}

@media (min-width: 992px) {
    .blog-sidebar {
        position: sticky;
        top: 90px;
    }
}

.blog-card .pg-card-img { height: 200px; }

/* Optimized detail page images */
.detail-media {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.detail-media img {
    width: 100%;
    height: auto;
    display: block;
}

/* Rich HTML content (blog, projects, services) */
.rich-content h2,
.rich-content h3,
.rich-content h4 { margin-top: 1.25rem; margin-bottom: 0.75rem; }
.rich-content p { margin-bottom: 1rem; }
.rich-content ul,
.rich-content ol { margin-bottom: 1rem; padding-left: 1.5rem; }
.rich-content img { max-width: 100%; height: auto; border-radius: 8px; }
.rich-content table { width: 100%; margin-bottom: 1rem; }
.rich-content blockquote {
    border-left: 4px solid var(--pg-blue);
    padding-left: 1rem;
    color: var(--pg-gray-600);
    margin: 1rem 0;
}

.blog-meta {
    font-size: 0.85rem;
    color: var(--pg-gray-600);
    margin-bottom: 0.75rem;
}

.blog-category {
    background: rgba(62, 142, 65, 0.1);
    color: var(--pg-green);
    padding: 0.2rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ---- Contact ---- */
.contact-split {
    background: var(--pg-white);
    border-radius: var(--pg-radius);
    box-shadow: var(--pg-shadow-lg);
    border: 1px solid var(--pg-gray-200);
    overflow: hidden;
}

.contact-panel {
    padding: 2.5rem 2rem;
    background: linear-gradient(145deg, var(--pg-blue-dark) 0%, var(--pg-blue) 55%, var(--pg-green) 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
}

.contact-panel .section-badge {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.contact-panel-title {
    font-size: clamp(1.75rem, 2.5vw, 2.25rem);
    color: #fff;
    margin-bottom: 1rem;
    line-height: 1.25;
}

.contact-panel-lead {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.contact-perks {
    list-style: none;
    padding: 0;
    margin: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.contact-perks li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-perk-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.contact-perk-icon i {
    font-size: 1.25rem;
    line-height: 1;
}

.contact-perks strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
}

.contact-perks li > div > span {
    display: block;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
}

.contact-panel-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-panel-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.contact-social-links {
    display: flex;
    gap: 0.75rem;
}

.contact-social-links a {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    transition: var(--pg-transition);
}

.contact-social-links a:hover {
    color: #fff;
    transform: translateY(-3px);
}

.contact-social-links a.social-linkedin:hover { background: #0A66C2; }
.contact-social-links a.social-github:hover { background: #24292f; }
.contact-social-links a.social-x:hover { background: #000; }
.contact-social-links a.social-facebook:hover { background: #1877F2; }
.contact-social-links a.social-instagram:hover { background: #E4405F; }

[data-theme="dark"] .contact-social-links a.social-x:hover {
    background: #e7e9ea;
    color: #000;
}

.contact-panel-address {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
}

.contact-form-panel {
    padding: 2.5rem 2rem;
}

@media (min-width: 992px) {
    .contact-form-panel {
        padding: 2.75rem 3rem;
    }

    .contact-panel {
        padding: 2.75rem 2.5rem;
    }
}

.contact-map iframe {
    border-radius: var(--pg-radius);
    box-shadow: var(--pg-shadow);
}

.form-control, .form-select {
    border: 2px solid var(--pg-gray-200);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    background: var(--pg-white);
    color: var(--pg-black);
    transition: var(--pg-transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--pg-blue);
    box-shadow: 0 0 0 3px rgba(43, 89, 162, 0.15);
    background: var(--pg-white);
    color: var(--pg-black);
}

.captcha-question {
    font-weight: 600;
    min-width: 90px;
    justify-content: center;
    background: var(--pg-gray-100);
    color: var(--pg-blue);
    user-select: none;
}

/* ---- Portfolio Filter ---- */
.filter-btn {
    border: 2px solid var(--pg-gray-300);
    background: transparent;
    color: var(--pg-gray-800);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-weight: 500;
    margin: 0.25rem;
    transition: var(--pg-transition);
    cursor: pointer;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--pg-blue);
    border-color: var(--pg-blue);
    color: #fff;
}

.tech-badge {
    display: inline-block;
    background: rgba(43, 89, 162, 0.1);
    color: var(--pg-blue);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    margin: 0.15rem;
    font-weight: 500;
}

/* ---- Timeline (Experience) ---- */
.timeline {
    position: relative;
    padding-left: 2.75rem;
    --timeline-axis: 7px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: var(--timeline-axis);
    top: 0;
    bottom: 0;
    width: 2px;
    transform: translateX(-50%);
    background: linear-gradient(to bottom, var(--pg-blue), var(--pg-green));
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 0;
}

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: calc(var(--timeline-axis) - 2.75rem);
    top: 0.4rem;
    width: 14px;
    height: 14px;
    transform: translateX(-50%);
    background: var(--pg-green);
    border-radius: 50%;
    border: 3px solid var(--pg-white);
    box-shadow: 0 0 0 2px var(--pg-blue);
    box-sizing: content-box;
}

/* ---- Footer ---- */
.footer-pg {
    background: var(--pg-gray-100);
    padding: 4rem 0 2rem;
    border-top: 3px solid var(--pg-blue);
}

[data-theme="dark"] .footer-pg { background: #0a0a14; }

.footer-pg h5 { color: var(--pg-blue); margin-bottom: 1.25rem; }

.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a { color: var(--pg-gray-600); }
.footer-links a:hover { color: var(--pg-green); }

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--pg-white);
    color: var(--pg-blue);
    margin-right: 0.5rem;
    box-shadow: var(--pg-shadow);
    transition: var(--pg-transition);
}

.social-links a:hover {
    color: #fff;
    transform: translateY(-3px);
}

.social-links a.social-linkedin:hover { background: #0A66C2; }
.social-links a.social-github:hover { background: #24292f; }
.social-links a.social-x:hover { background: #000; }
.social-links a.social-facebook:hover { background: #1877F2; }
.social-links a.social-instagram:hover { background: #E4405F; }

[data-theme="dark"] .social-links a.social-x:hover {
    background: #e7e9ea;
    color: #000;
}

.social-icon-x {
    width: 1.05em;
    height: 1.05em;
    fill: currentColor;
}

/* ---- Page Header ---- */
.page-header {
    background: linear-gradient(135deg, var(--pg-blue) 0%, var(--pg-blue-dark) 100%);
    color: #fff;
    padding: 5rem 0 3rem;
    text-align: center;
}

.page-header h1 { color: #fff; margin-bottom: 0.5rem; }
.page-header .breadcrumb { justify-content: center; }
.page-header .breadcrumb-item a { color: rgba(255,255,255,0.8); }
.page-header .breadcrumb-item.active { color: rgba(255,255,255,0.6); }
.page-header .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.5); }

/* ---- Scroll to Top ---- */
.scroll-top-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    background: var(--pg-blue);
    color: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 15px rgba(43, 89, 162, 0.35);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--pg-transition);
    cursor: pointer;
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    background: var(--pg-blue-dark);
    color: #fff;
    transform: translateY(-3px);
}

.scroll-top-btn.visible:hover {
    transform: translateY(-3px);
}

/* ---- Animations ---- */
.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ---- Pagination ---- */
.pagination .page-link {
    color: var(--pg-blue);
    border-color: var(--pg-gray-300);
    border-radius: 8px;
    margin: 0 3px;
}

.pagination .page-item.active .page-link {
    background: var(--pg-blue);
    border-color: var(--pg-blue);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .hero-section { min-height: auto; padding: 4rem 0; }
    .section-padding { padding: 3rem 0; }
    .stat-number { font-size: 2rem; }
}
