/* ============================================================
   Portfolio — Selfown-inspired theme
   ============================================================ */
:root {
    --primary: #5f27cd;
    --secondary: #00b8d9;
    --gradient: linear-gradient(135deg, #5f27cd 0%, #341f97 50%, #00b8d9 130%);
    --gradient-soft: linear-gradient(135deg, rgba(95, 39, 205, .08), rgba(0, 184, 217, .08));
    --dark: #1e2235;
    --muted: #6c7293;
    --light-bg: #f6f7fd;
    --card-bg: #ffffff;
    --radius: 18px;
    --shadow: 0 10px 40px rgba(30, 34, 53, .08);
    --shadow-hover: 0 20px 50px rgba(95, 39, 205, .18);
}

* { font-family: 'Poppins', sans-serif; }
body { background: #fff; color: var(--dark); overflow-x: hidden; }

h1, h2, h3, h4, h5, h6 { font-weight: 700; }

.text-gradient {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ---------------- Navbar ---------------- */
.portfolio-nav {
    padding: 18px 0;
    transition: all .35s ease;
    background: transparent;
}
.portfolio-nav.scrolled {
    background: #fff;
    box-shadow: 0 5px 30px rgba(30, 34, 53, .08);
    padding: 10px 0;
}
.portfolio-nav .navbar-brand { font-size: 1.75rem; color: var(--dark); }
.portfolio-nav .nav-link {
    color: var(--dark);
    font-weight: 500;
    font-size: .95rem;
    margin: 0 6px;
    position: relative;
    transition: color .3s;
}
.portfolio-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    width: 0; height: 2px;
    background: var(--gradient);
    transition: all .3s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}
.portfolio-nav .nav-link:hover::after,
.portfolio-nav .nav-link.active::after { width: 60%; }
.portfolio-nav .nav-link:hover,
.portfolio-nav .nav-link.active { color: var(--primary); }

/* ---------------- Buttons ---------------- */
.btn-gradient {
    background: var(--gradient);
    border: none;
    color: #fff;
    border-radius: 50px;
    padding: 12px 32px;
    font-weight: 500;
    transition: all .3s ease;
    box-shadow: 0 8px 25px rgba(95, 39, 205, .35);
}
.btn-gradient:hover, .btn-gradient:focus {
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 14px 35px rgba(95, 39, 205, .45);
}
.btn-outline-gradient {
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: 50px;
    padding: 10px 30px;
    font-weight: 500;
    transition: all .3s ease;
    background: transparent;
}
.btn-outline-gradient:hover {
    background: var(--gradient);
    border-color: transparent;
    color: #fff;
    transform: translateY(-3px);
}

/* ---------------- Hero ---------------- */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 140px 0 80px;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--light-bg);
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(246, 247, 253, .82), rgba(246, 247, 253, .65));
    pointer-events: none;
}
.hero-hi { color: var(--muted); font-weight: 500; letter-spacing: 1px; }
.hero-name { font-size: 3rem; font-weight: 800; }
.hero-title { font-size: 1.7rem; font-weight: 600; color: var(--dark); }
.typed-cursor { color: var(--primary); animation: blink .8s infinite; font-weight: 300; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-img-wrap { position: relative; display: inline-block; }
.hero-blob { display: none; }
.hero-img {
    position: relative;
    width: 100%;
    max-width: 460px;
    filter: drop-shadow(0 30px 40px rgba(95, 39, 205, .28));
    animation: heroFloat 6s ease-in-out infinite;
}
@keyframes heroFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}

.hero-info .info-item {
    background: #fff;
    border-radius: 14px;
    padding: 12px 18px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    height: 100%;
}
.info-label { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.info-value { font-weight: 600; font-size: .95rem; }

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px; height: 42px;
    border-radius: 50%;
    background: #fff;
    color: var(--primary);
    font-size: 1.1rem;
    margin-right: 10px;
    box-shadow: var(--shadow);
    transition: all .3s ease;
    text-decoration: none;
}
.social-links a:hover {
    background: var(--gradient);
    color: #fff;
    transform: translateY(-4px);
}

/* ---------------- Sections ---------------- */
.section { padding: 100px 0; }
.section-alt { background: var(--light-bg); }
.section-subtitle {
    display: inline-block;
    color: var(--primary);
    font-weight: 600;
    font-size: .85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 6px 18px;
    border-radius: 50px;
    background: rgba(95, 39, 205, .08);
    margin-bottom: 12px;
}
.section-title { font-size: 2.3rem; font-weight: 700; }
.section-text { color: var(--muted); line-height: 1.9; }

/* ---------------- Skills ---------------- */
.skill-tabs .nav-link {
    color: var(--muted);
    border-radius: 50px;
    padding: 8px 22px;
    margin: 4px;
    font-weight: 500;
    font-size: .9rem;
    transition: all .3s ease;
}
.skill-tabs .nav-link.active {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 8px 20px rgba(95, 39, 205, .3);
}
.skill-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 28px 22px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all .35s ease;
}
.skill-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-hover); }
.skill-icon {
    width: 64px; height: 64px;
    margin: 0 auto 14px;
    border-radius: 18px;
    background: var(--gradient-soft);
    color: var(--primary);
    font-size: 1.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .35s ease;
}
.skill-card:hover .skill-icon { background: var(--gradient); color: #fff; }
.skill-name { font-weight: 600; font-size: .95rem; min-height: 2.4em; }
.skill-exp { font-size: .8rem; color: var(--muted); }
.skill-progress { height: 6px; border-radius: 6px; background: #eceefb; }
.skill-progress .progress-bar {
    background: var(--gradient);
    border-radius: 6px;
    transition: width 1.2s ease;
}

/* ---------------- Services ---------------- */
.service-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 34px 26px;
    box-shadow: var(--shadow);
    transition: all .35s ease;
    border-bottom: 3px solid transparent;
}
.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-bottom-color: var(--primary);
}
.service-icon {
    width: 62px; height: 62px;
    border-radius: 50%;
    background: var(--gradient);
    color: #fff;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}
.service-title { font-size: 1.05rem; }
.service-text { color: var(--muted); font-size: .9rem; line-height: 1.8; margin-bottom: 0; }

/* ---------------- Timeline ---------------- */
.resume-heading { font-size: 1.3rem; margin-bottom: 28px; color: var(--dark); }
.resume-heading i { color: var(--primary); }
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
    content: '';
    position: absolute;
    left: 6px; top: 6px; bottom: 6px;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    border-radius: 2px;
}
.timeline-item { position: relative; margin-bottom: 30px; }
.timeline-item::before {
    content: '';
    position: absolute;
    left: -28px; top: 6px;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: #fff;
    border: 4px solid var(--primary);
}
.timeline-badge {
    display: inline-block;
    background: var(--gradient);
    color: #fff;
    font-size: .75rem;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 50px;
    margin-bottom: 10px;
}
.timeline-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 22px 24px;
    box-shadow: var(--shadow);
    transition: all .3s ease;
}
.timeline-card:hover { transform: translateX(6px); box-shadow: var(--shadow-hover); }
.timeline-card h5 { font-size: 1.05rem; }
.timeline-place { color: var(--primary); font-size: .85rem; font-weight: 500; display: block; margin-bottom: 8px; }
.timeline-card p { color: var(--muted); font-size: .88rem; line-height: 1.8; margin-bottom: 0; }
.timeline-list { color: var(--muted); font-size: .88rem; line-height: 1.8; padding-left: 18px; margin-bottom: 0; }

/* ---------------- Projects ---------------- */
.project-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    transition: all .35s ease;
    cursor: pointer;
    border-top: 3px solid transparent;
}
.project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-top-color: var(--primary);
}
.project-title { font-size: 1.05rem; margin-bottom: 0; }
.project-period {
    flex-shrink: 0;
    font-size: .72rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(95, 39, 205, .08);
    border-radius: 50px;
    padding: 4px 12px;
    white-space: nowrap;
}
.project-meta { display: flex; flex-wrap: wrap; gap: 14px; margin: 12px 0; font-size: .82rem; color: var(--muted); }
.project-desc { color: var(--muted); font-size: .9rem; line-height: 1.8; }
.project-more { color: var(--primary); font-weight: 600; font-size: .85rem; }
.project-more i { transition: transform .3s; }
.project-card:hover .project-more i { transform: translateX(5px); }

/* ---------------- Trainings ---------------- */
.training-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px 26px;
    box-shadow: var(--shadow);
    transition: all .3s ease;
    border-left: 4px solid var(--secondary);
}
.training-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.training-title { font-size: .98rem; margin-bottom: 0; }
.training-role {
    flex-shrink: 0;
    font-size: .7rem;
    font-weight: 600;
    color: #fff;
    background: var(--gradient);
    border-radius: 50px;
    padding: 4px 12px;
    white-space: nowrap;
}
.training-meta { display: flex; flex-wrap: wrap; gap: 14px; margin: 10px 0; font-size: .8rem; color: var(--muted); }
.training-outcome { color: var(--muted); font-size: .87rem; line-height: 1.7; margin-bottom: 0; }

/* ---------------- Contact ---------------- */
.contact-info-card {
    background: var(--gradient);
    border-radius: var(--radius);
    padding: 40px 32px;
    color: #fff;
    height: 100%;
    box-shadow: var(--shadow-hover);
}
.contact-info-item { display: flex; gap: 18px; align-items: center; margin-bottom: 28px; }
.contact-info-item:last-child { margin-bottom: 0; }
.contact-icon {
    width: 52px; height: 52px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}
.contact-info-item h6 { margin-bottom: 2px; font-size: .95rem; }
.contact-info-item p { margin-bottom: 0; font-size: .9rem; opacity: .9; }

.contact-form .form-control {
    border: none;
    background: var(--light-bg);
    border-radius: 12px;
    padding: 14px 20px;
    font-size: .92rem;
}
.contact-form .form-control:focus {
    background: #fff;
    box-shadow: 0 0 0 3px rgba(95, 39, 205, .18);
}

/* ---------------- Footer ---------------- */
.footer {
    background: var(--dark);
    color: #aab;
    padding: 40px 0;
    font-size: .9rem;
}
.footer .social-links a { background: rgba(255, 255, 255, .08); color: #fff; box-shadow: none; }
.footer .social-links a:hover { background: var(--gradient); }

/* ---------------- Responsive ---------------- */
@media (max-width: 991px) {
    .hero-name { font-size: 2.3rem; }
    .hero-title { font-size: 1.3rem; }
    .hero-section { padding-top: 120px; text-align: center; }
    .hero-actions { justify-content: center; }
    .section { padding: 70px 0; }
    .section-title { font-size: 1.8rem; }
    .portfolio-nav { background: #fff; box-shadow: 0 5px 30px rgba(30, 34, 53, .08); }
}


/* ---------------- Preloader ---------------- */
#preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .45s ease, visibility .45s ease;
}
#preloader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.preloader-logo-img { width: 128px; height: 128px; object-fit: contain; border-radius: 26px; animation: pulseLogo 1.2s ease-in-out infinite; }
.brand-logo-lg { width: 128px; height: 128px; font-size: 2.2rem; animation: pulseLogo 1.2s ease-in-out infinite; }
@keyframes pulseLogo { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.preloader-spinner {
    width: 46px; height: 46px;
    border-radius: 50%;
    border: 4px solid rgba(95, 39, 205, .15);
    border-top-color: var(--primary);
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- Brand logo ---------------- */
.brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px; height: 56px;
    border-radius: 14px;
    background: var(--gradient);
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: .5px;
    box-shadow: 0 6px 18px rgba(95, 39, 205, .35);
}
.brand-logo-img {
    width: 56px; height: 56px;
    object-fit: contain;
    border-radius: 14px;
}
.brand-name { font-size: 1.5rem; }

/* ---------------- Company info card ---------------- */
.company-item { flex-direction: row !important; align-items: center; gap: 12px; }
.company-item .company-logo {
    width: 44px; height: 44px;
    object-fit: contain;
    border-radius: 10px;
    flex-shrink: 0;
}
.company-item .info-value a { color: inherit; text-decoration: none; }
.company-item .info-value a:hover { color: var(--primary); }

/* ---------------- Inner pages ---------------- */
.page-section { padding-top: 160px; min-height: 70vh; }

/* ---------------- CTA band ---------------- */
.cta-section {
    background: var(--gradient);
    padding: 80px 0;
}

/* ---------------- Project thumbs ---------------- */
.project-thumb {
    border-radius: 12px;
    overflow: hidden;
    max-height: 220px;
}
.project-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------------- Training thumbs ---------------- */
.training-thumb {
    border-radius: 12px;
    overflow: hidden;
    max-height: 240px;
}
.training-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------------- Opportunities ---------------- */
.opportunity-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    transition: all .35s ease;
    border-left: 4px solid var(--primary);
    display: flex;
    flex-direction: column;
}
.opportunity-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.opportunity-title { font-size: 1.05rem; margin-bottom: 0; }
.opportunity-category {
    flex-shrink: 0;
    font-size: .72rem;
    font-weight: 600;
    color: #fff;
    background: var(--gradient);
    border-radius: 50px;
    padding: 4px 14px;
    white-space: nowrap;
}
.opportunity-desc { color: var(--muted); font-size: .9rem; line-height: 1.8; margin: 14px 0; flex-grow: 1; }
.opportunity-meta { font-size: .82rem; color: var(--muted); margin-bottom: 12px; }
.opportunity-link { color: var(--primary); font-weight: 600; font-size: .88rem; text-decoration: none; }
.opportunity-link:hover { text-decoration: underline; }
.opportunity-item { transition: opacity .3s ease, transform .3s ease; }
.opportunity-item.filtered-out { display: none; }

/* ---------------- Opportunities: search toolbar ---------------- */
.opp-toolbar { background: #fff; border-radius: 50px; padding: 10px; box-shadow: var(--shadow); }
.opp-search { position: relative; min-width: 260px; }
.opp-search i { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.opp-search .form-control { padding-left: 44px; border-radius: 50px; border: none; background: var(--light-bg); }
.opp-search .form-control:focus { background: #fff; box-shadow: 0 0 0 3px rgba(95, 39, 205, .18); }
.opp-toolbar .form-select { border-radius: 50px; border: none; background-color: var(--light-bg); font-size: .9rem; }

/* ---------------- Opportunities: images & badges ---------------- */
.opportunity-thumb { height: 180px; border-radius: 12px; overflow: hidden; margin-bottom: 18px; background: var(--gradient-soft); }
.opportunity-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.opportunity-card:hover .opportunity-thumb img { transform: scale(1.06); }
.opportunity-thumb-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 2.2rem; }

.opportunity-badge { display: inline-flex; align-items: center; font-size: .72rem; font-weight: 600; border-radius: 50px; padding: 5px 14px; white-space: nowrap; }
.opportunity-status-active { background: rgba(25, 135, 84, .12); color: #198754; }
.opportunity-status-expired { background: rgba(220, 53, 69, .12); color: #dc3545; }
.opportunity-countdown { background: rgba(255, 193, 7, .18); color: #9c7a00; }

#opportunityModal .modal-content { border: none; border-radius: var(--radius); box-shadow: var(--shadow-hover); }

/* ---------------- Floating WhatsApp button ---------------- */
.whatsapp-float {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1050;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.9rem;
    text-decoration: none;
    box-shadow: 0 8px 25px rgba(37, 211, 102, .45);
    transition: all .3s ease;
}
.whatsapp-float:hover {
    color: #fff;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 14px 35px rgba(37, 211, 102, .55);
}
.whatsapp-tooltip {
    position: absolute;
    right: 72px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--dark);
    color: #fff;
    font-size: .78rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 50px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}
.whatsapp-float:hover .whatsapp-tooltip { opacity: 1; }

@media (max-width: 991px) {
    .whatsapp-float { width: 54px; height: 54px; font-size: 1.7rem; right: 18px; bottom: 18px; }
    .whatsapp-tooltip { display: none; }
}
