/* =====================================================
   ROOT TOKENS — single source of truth for all colours
   ===================================================== */
:root {
    /* Backgrounds */
    --bg:           #070b17;
    --bg-2:         #0b1120;
    --bg-card:      #0a0e18;
    --bg-card-2:    #0f1521;
    --bg-input:     #1a1e2e;

    /* Text */
    --text:         #e6e9f2;
    --muted:        #94a3b8;

    /* Brand colours */
    --primary:      #3b82f6;
    --primary-dark: #6d28d9;
    --accent:       #6f78fe;
    --accent-light: #a78bfa;
    --accent-blue:  #93c5fd;

    /* Borders / strokes */
    --stroke:       #1f2937;
    --border-card:  rgba(255, 255, 255, 0.08);
    --border-glow:  rgba(111, 120, 254, 0.35);
    --border-purple:rgba(113, 5, 237, 0.22);

    /* Shadows */
    --shadow-sm:    1px 1px 15px var(--border-purple);
    --shadow-glow:  0 15px 40px rgba(0, 0, 0, 0.5);
    --shadow-blue:  10px 10px 60px rgba(0, 140, 255, 0.8);
    --shadow-hero:  0 30px 100px var(--border-purple);

    /* Transitions */
    --ease:         0.3s ease;
    --ease-long:    0.5s ease-in-out;
}

/* =====================================================
   RESET & BASE
   ===================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
}

/* =====================================================
   NAVBAR
   ===================================================== */
.transparent-nav {
    background: rgba(25, 2, 67, 0.25);
    backdrop-filter: blur(5px);
}

.nav-link {
    position: relative;
    transition: opacity var(--ease), transform var(--ease);
    opacity: .82;
    color: var(--text) !important;
}
.nav-link::before {
    content: "";
    position: absolute;
    bottom: 0; left: 50%;
    width: 0; height: 3px;
    background: var(--primary-dark);
    transition: width .45s ease, left .45s ease;
}
.nav-link:hover::before { width: 85%; left: 6%; }
.nav-link:hover         { opacity: 1; transform: translate(-3px, -3px) scale(1.02); }

.navbar-brand { transition: transform var(--ease); }
.navbar-brand:hover { transform: translate(-3px, -3px) scale(1.02); }

.get-in-touch { transition: transform var(--ease); }
.get-in-touch:hover { transform: translate(-3px, -3px) scale(1.02); }


/* =====================================================
   HERO
   ===================================================== */
.hero-section {
    width: 100%;
    padding: 80px 0;
    background:
        radial-gradient(1200px 600px at 75% 20%, rgba(59, 130, 246, .25), transparent 60%),
        radial-gradient(900px  500px at 85% 70%, rgba(109, 40, 217, .22), transparent 62%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
    position: relative;
    z-index: 1;
}
.hero-section::after {
    content: "";
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 120px;
    background: linear-gradient(to bottom, transparent, rgba(7, 11, 23, .95));
    z-index: -1;
}

#hero-label { color: var(--text); }

#photo-div { animation: moveImage 2.5s linear infinite alternate; }
@keyframes moveImage {
    0%   { transform: translateY(-15px); }
    100% { transform: translateY( 15px); }
}

.hero-img {
    box-shadow: var(--shadow-hero);
    max-width: 420px;
    width: 80%;
    height: auto;
    object-fit: cover;
    cursor: pointer;
    border: 5px solid var(--border-purple);
    transition: box-shadow var(--ease-long);
    z-index: 1;
}
.hero-img:hover { box-shadow: 10px 10px 100px var(--primary); }

/* Typing cursor */
.typing {
    border-right: 3px solid rgba(45, 3, 255, .25);
    white-space: nowrap;
    overflow: hidden;
    display: inline-block;
    animation: blink 1s infinite;
    color: var(--primary);
}
@keyframes blink {
    0%,  50% { border-color: transparent; }
    51%, 100% { border-color: rgba(84, 0, 252, .25); }
}

/* Social icon circles */
.icon-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px; height: 50px;
    border-radius: 50%;
    background: transparent;
    transition: background var(--ease), transform var(--ease);
}
.icon-circle img {
    width: 28px; height: 28px;
    filter: brightness(0) invert(1);
    transition: transform .25s ease;
}
.icon-circle:hover {
    background: var(--accent);
    transform: translate(-3px, -3px) scale(1.08);
}
.icon-circle:hover img { transform: scale(1.05); }

/* Outline CTA link */
.btnlink { transition: transform var(--ease); }
.btnlink:hover { transform: translate(-3px, -3px); }

/* Animated download button */
.button {
    position: relative;
    width: 150px; height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    border: 1px solid #353fc9;
    background-color: var(--accent);
    overflow: hidden;
    transition: transform var(--ease);
}
.button__text, .button__icon { transition: all .3s; }
.button__text {
    transform: translateX(10px);
    color: #fff;
    font-weight: 600;
}
.button__icon {
    position: absolute;
    transform: translateX(109px);
    height: 100%; width: 39px;
    background-color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}
.button:hover                { transform: translate(-2px, -2px); }
.button:hover .button__text  { color: transparent; }
.button:hover .button__icon  { width: 148px; transform: translateX(0); }


/* =====================================================
   SECTION HEADINGS (shared utility)
   ===================================================== */
.section-heading {
    position: relative;
    padding-bottom: 4px;
}
.section-heading::before {
    content: "";
    position: absolute;
    bottom: 0; left: 47%;
    width: 5%; height: 4px;
    background: var(--accent);
    transition: width 1s ease, left 1s ease;
}
.section-heading:hover::before { left: 40%; width: 20%; }


/* =====================================================
   EDUCATION
   ===================================================== */
.education {
    padding-bottom: 30px;
    background:
        radial-gradient(1200px 600px at 25% 80%, rgba(59, 130, 246, .25), transparent 60%),
        radial-gradient(900px  500px at 15% 30%, rgba(109, 40, 217, .22), transparent 62%),
        linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
    position: relative;
    z-index: 1;
}
.education::after {
    content: "";
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 120px;
    background: linear-gradient(to bottom, transparent, rgba(7, 11, 23, .95));
    z-index: -1;
}

.education-img {
    max-width: 100%;
    height: 400px;
    object-fit: cover;
    box-shadow: var(--shadow-hero);
    border: 5px solid var(--border-purple);
    border-radius: 50px;
    transition: box-shadow var(--ease-long), transform var(--ease-long);
}
.education-img:hover {
    box-shadow: 10px 10px 100px var(--primary);
    transform: translate(-2px, -2px);
    cursor: pointer;
}

.edu-year {
    font-size: 1rem;
    font-weight: 500;
    color: var(--primary);
}


/* =====================================================
   EXPERIENCE
   ===================================================== */
.exp .card,
.exp-card {
    background-color: var(--bg-card);
    border: 2px solid var(--border-purple);
    border-left: 3px solid var(--primary);
    box-shadow: var(--shadow-sm);
    transition: transform var(--ease-long), box-shadow var(--ease-long), border-left-width var(--ease);
    color: var(--text);
}
.exp-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 10px 10px 100px rgba(65, 65, 220, .6);
    border-left-width: 5px;
}

/* Left column accent stripe */
.left-col {
    border-left: 4px solid var(--primary);
    padding-left: 1rem;
}

.exp-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: .75rem;
    flex-wrap: wrap;
}
.exp-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: .2rem;
    color: var(--text);
}
.exp-org {
    font-size: .85rem;
    font-weight: 600;
    color: var(--muted);
}
.exp-badge {
    background: var(--primary);
    color: #fff;
    border-radius: 50px;
    font-size: .75rem;
    padding: 4px 12px;
    white-space: nowrap;
    flex-shrink: 0;
}
.exp-card-body {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}
.exp-card-body ul { flex: 1; padding-left: 1.1rem; margin: 0; }
.exp-card-body li { font-size: .875rem; opacity: .85; margin-bottom: .3rem; }
.exp-logo {
    width: 48px; height: 48px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 8px;
}


/* =====================================================
   SKILLS
   ===================================================== */
.skills-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    z-index: 0;
    border: 1px solid var(--border-card);
    border-left: 2px solid var(--primary);
    box-shadow: 5px 5px 25px var(--border-purple);
    transition: box-shadow var(--ease), transform var(--ease), border-left-width var(--ease);
}
.skills-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 2px solid rgba(255, 255, 255, .08);
    border-radius: 12px;
    animation: rotateBorder 6s linear infinite;
    pointer-events: none;
    z-index: 2;
}
.skills-card:hover {
    box-shadow: var(--shadow-blue);
    transform: translate(-4px, -4px) scale(1.02);
    border-left-width: 3px;
}

.skills-card-title {
    font-size: .95rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: .85rem;
    color: var(--text);
}

/* Skill tags — same shape as project tech tags, unified */
.skill-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: .78rem;
    background: rgba(59, 130, 246, .08);
    border: 1px solid rgba(59, 130, 246, .25);
    color: var(--accent-blue);
    cursor: default;
    transition: background var(--ease), border-color var(--ease), color var(--ease);
}
.skill-tag:hover {
    background: rgba(59, 130, 246, .2);
    border-color: var(--primary);
    color: #fff;
}


/* =====================================================
   PROJECTS — toolbar
   ===================================================== */
.proj-toolbar {
    gap: 14px;
    margin-bottom: 8px;
}
.proj-search-wrap {
    position: relative;
    max-width: 480px;
    width: 100%;
}
.proj-search-icon {
    position: absolute;
    left: 16px; top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: .9rem;
    pointer-events: none;
}
.proj-search-input {
    width: 100%;
    padding: 10px 42px;
    background: var(--bg-card);
    border: 1.5px solid rgba(113, 5, 237, .35);
    border-radius: 50px;
    color: var(--text);
    font-size: .95rem;
    outline: none;
    transition: border-color var(--ease), box-shadow var(--ease);
}
.proj-search-input::placeholder { color: var(--muted); }
.proj-search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(111, 120, 254, .15);
}
.proj-search-clear {
    position: absolute;
    right: 14px; top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: .9rem;
    padding: 0; line-height: 1;
    transition: color var(--ease);
}
.proj-search-clear:hover { color: #fff; }

.proj-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.proj-filter-pill {
    background: transparent;
    border: 1.5px solid rgba(113, 5, 237, .45);
    color: var(--muted);
    border-radius: 50px;
    padding: 5px 18px;
    font-size: .85rem;
    cursor: pointer;
    transition: border-color var(--ease), color var(--ease), transform var(--ease), background var(--ease);
    white-space: nowrap;
}
.proj-filter-pill:hover {
    border-color: var(--accent);
    color: #fff;
    transform: translateY(-2px);
}
.proj-filter-pill.active {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 15px var(--border-glow);
}

.proj-no-results {
    text-align: center;
    color: var(--muted);
    margin-top: 2rem;
    font-size: 1rem;
}


/* =====================================================
   PROJECTS — cards
   ===================================================== */
.project-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 14px;
    overflow: hidden;
    color: var(--text);
    transition: transform .4s ease, box-shadow .4s ease, border-color .4s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.project-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-glow);
    border-color: rgba(113, 5, 237, .4);
}

.project-img-wrap {
    position: relative;
    overflow: hidden;
    height: 200px;
}
.project-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .5s ease, filter .4s ease;
}
.project-card:hover .project-img-wrap img {
    transform: scale(1.07);
    filter: blur(3px) brightness(.55);
}

/* Type badge — top-left corner of image */
.project-type-badge {
    position: absolute;
    top: 10px; left: 10px;
    z-index: 2;
    padding: 3px 11px;
    border-radius: 50px;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .03em;
    background: rgba(10, 14, 24, .78);
    border: 1px solid rgba(111, 120, 254, .55);
    color: var(--accent-light);
    backdrop-filter: blur(4px);
    pointer-events: none;
}

/* Hover overlay buttons */
.project-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    opacity: 0;
    transition: opacity .35s ease;
}
.project-card:hover .project-overlay { opacity: 1; }

.overlay-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 20px;
    border-radius: 50px;
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, .25);
    backdrop-filter: blur(6px);
    background: rgba(10, 14, 24, .75);
    color: #fff;
    transition: background var(--ease), border-color var(--ease), transform var(--ease), box-shadow var(--ease);
    white-space: nowrap;
}
.overlay-btn:hover {
    background: rgba(111, 120, 254, .9);
    border-color: var(--accent);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(111, 120, 254, .45);
}
.overlay-btn--live:hover {
    background: rgba(59, 130, 246, .9);
    border-color: var(--primary);
    box-shadow: 0 6px 20px rgba(59, 130, 246, .45);
}

.project-body {
    padding: 1.1rem 1.2rem 1.3rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.project-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: .4rem;
    color: var(--text);
}
.project-desc {
    font-size: .87rem;
    color: var(--muted);
    margin-bottom: .75rem;
    flex: 1;
    line-height: 1.55;
}

/* Tech tags — unified with .skill-tag shape, different colour */
.ptag {
    display: inline-block;
    padding: 3px 11px;
    border-radius: 50px;
    font-size: .75rem;
    background: rgba(59, 130, 246, .1);
    border: 1px solid rgba(59, 130, 246, .3);
    color: var(--accent-blue);
    transition: background var(--ease), border-color var(--ease), color var(--ease);
}
.ptag:hover {
    background: rgba(59, 130, 246, .25);
    border-color: var(--primary);
    color: #fff;
}

/* Card entrance animation */
.proj-card-col { animation: projFadeIn .45s ease forwards; }
@keyframes projFadeIn {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0);    }
}


/* =====================================================
   EXPAND / LESS BUTTONS (shared: projects + certs)
   ===================================================== */
.expand-btn {
    background-color: var(--bg-card-2);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    z-index: 0;
    color: var(--text);
    border: none;
    box-shadow: 10px 10px 50px var(--border-purple);
    transition: box-shadow var(--ease), transform var(--ease);
}
.expand-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 2px solid rgba(255, 255, 255, .08);
    border-radius: 12px;
    animation: rotateBorder 3s linear infinite;
    pointer-events: none;
    z-index: 2;
}
.expand-btn:hover {
    box-shadow: var(--shadow-blue);
    transform: translate(-4px, -4px) scale(1.02);
    color: #fff;
}

@keyframes rotateBorder {
    0%   { clip-path: polygon(0 0, 100% 0, 100% 3px, 0 3px); }
    25%  { clip-path: polygon(calc(100% - 3px) 0, 100% 0, 100% 100%, calc(100% - 3px) 100%); }
    50%  { clip-path: polygon(0 calc(100% - 3px), 100% calc(100% - 3px), 100% 100%, 0 100%); }
    75%  { clip-path: polygon(0 0, 3px 0, 3px 100%, 0 100%); }
    100% { clip-path: polygon(0 0, 100% 0, 100% 3px, 0 3px); }
}


/* =====================================================
   CERTIFICATIONS
   ===================================================== */
.cert-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    overflow: hidden;
    color: var(--text);
}

.cert-card-hover{
    transition: transform .4s ease, box-shadow .4s ease, border-color .4s ease;
    cursor: pointer;
}

.cert-card-hover:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-glow);
    border-color: rgba(113, 5, 237, .4);
}

.cert-img-wrap {
    position: relative;
    overflow: hidden;
    height: 180px;
}
.cert-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .5s ease, filter .4s ease;
}
.cert-card:hover .cert-img-wrap img {
    transform: scale(1.06);
    filter: blur(3px) brightness(.45);
}

.cert-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .35s ease;
}
.cert-card:hover .cert-overlay { opacity: 1; }

.cert-preview-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 28px;
    border-radius: 50px;
    font-size: .9rem;
    font-weight: 700;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, rgba(109, 40, 217, .85), rgba(59, 130, 246, .85));
    border: 2px solid rgba(255, 255, 255, .2);
    backdrop-filter: blur(6px);
    box-shadow: 0 8px 30px rgba(111, 120, 254, .4);
    transition: background var(--ease), transform var(--ease), box-shadow var(--ease);
    white-space: nowrap;
}
.cert-preview-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 12px 35px rgba(111, 120, 254, .6);
    color: #fff;
}
.cert-preview-btn i { font-size: 1rem; }

.cert-card .card-body { padding: 1rem 1.2rem; }
.cert-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: .4rem;
    color: var(--text);
}
.cert-desc {
    font-size: .875rem;
    color: var(--muted);
    margin: 0;
    line-height: 1.5;
}

/* Scroll fade-in for expanded cert cards */
.cert-card.fade-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 1s ease;
}
.cert-card.fade-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}


/* =====================================================
   SERVICES
   ===================================================== */
.service-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    overflow: hidden;
    color: var(--text);
    transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}
.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
    border-color: rgba(113, 5, 237, .4);
}
.service-card .card-img-top { height: 200px; object-fit: cover; }
.service-title {
    font-size: 1.05rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: .75rem;
    color: var(--text);
}
.service-card ul { padding-left: 1.1rem; margin: 0; }
.service-card li { font-size: .9rem; margin-bottom: .35rem; opacity: .9; }


/* =====================================================
   CONTACT
   ===================================================== */
.contact { background-color: var(--bg-card); color: var(--text); }

.contact .form-control {
    background-color: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, .2);
    color: var(--text);
    padding: 12px 18px;
}
.contact .form-control::placeholder { color: rgba(255, 255, 255, .5); }
.contact .form-control:focus {
    border-color: var(--primary-dark);
    box-shadow: 0 0 8px rgba(113, 5, 237, .5);
    color: var(--text);
    background-color: var(--bg-input);
}

.contact button[type="submit"] {
    background: linear-gradient(45deg, var(--primary-dark), #3f51b5);
    border: none;
    padding: 12px;
    font-weight: 700;
    transition: transform var(--ease), box-shadow var(--ease);
}
.contact button[type="submit"]:hover {
    transform: scale(1.03);
    box-shadow: 0 5px 20px rgba(113, 5, 237, .6);
}

.contact-img {
    max-width: 300px;
    animation: float 3s ease-in-out infinite;
}
@keyframes float {
    0%,  100% { transform: translateY(0);    }
    50%        { transform: translateY(-15px); }
}

.swal-custom {
    border-radius: 15px;
    border: 2px solid rgba(111, 120, 254, .8);
    box-shadow: 0 10px 40px rgba(111, 120, 254, .5);
}


/* =====================================================
   FOOTER
   ===================================================== */
.footer { background: #030d25; color: var(--text); }
.footer .nav-link {
    color: var(--muted) !important;
    transition: color var(--ease);
}
.footer .nav-link:hover {
    color: var(--accent) !important;
    transform: none;
}
.footer-divider {
    border: 0;
    border-top: 1px solid var(--stroke);
    margin: 1rem auto;
    width: 80%;
}

.text-muted-color{
    color: var(--muted);
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 991.98px) {
    .left-col {
        border-left: none;
        border-top: 4px solid var(--primary);
        padding-left: 0;
        padding-top: 1rem;
    }
    .education-img { height: auto; }
}

@media (max-width: 767.98px) {
    .hero-section  { padding: 100px 0 60px; }
    .hero-img      { max-width: 260px; }
    .proj-toolbar  { gap: 10px; }
    .proj-search-wrap { max-width: 100%; }
    .proj-filters  { gap: 6px; }
    .proj-filter-pill { padding: 4px 13px; font-size: .8rem; }
    .project-img-wrap { height: 170px; }
    .cert-img-wrap { height: 155px; }
    .overlay-btn   { padding: 7px 14px; font-size: .8rem; }
    .cert-preview-btn { padding: 9px 22px; font-size: .85rem; }
}

@media (max-width: 575.98px) {
    .proj-filter-pill { padding: 4px 11px; font-size: .78rem; }
    .project-title    { font-size: .98rem; }
    .overlay-btn      { padding: 6px 12px; font-size: .78rem; gap: 5px; }
    .expand-btn       { padding: 8px 28px !important; font-size: .87rem; }
}
