/* ===== IMPORTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,600&display=swap');

/* ===== CSS RESET & BASE ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-orange: #e8822a;
    --dark-bg: #1a1a1a;
    --card-bg: rgba(30, 30, 30, 0.85);
    --card-border: rgba(80, 80, 80, 0.5);
    --text-white: #ffffff;
    --text-light: #d4d4d4;
    --text-muted: #a0a0a0;
    --marble-dark: #0d0d0d;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--marble-dark);
    color: var(--text-white);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== MARBLE BACKGROUND ===== */
.portfolio-wrapper {
    position: relative;
    max-width: 850px;
    margin: 0 auto;
    padding: 40px 30px 60px;
    min-height: 100vh;
    background:
        linear-gradient(135deg,
            rgba(20, 20, 20, 0.95) 0%,
            rgba(10, 10, 10, 0.98) 30%,
            rgba(25, 25, 25, 0.95) 50%,
            rgba(5, 5, 5, 0.97) 70%,
            rgba(20, 20, 20, 0.96) 100%);
}

.portfolio-wrapper::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(40, 40, 40, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(50, 50, 50, 0.2) 0%, transparent 40%),
        radial-gradient(ellipse at 60% 80%, rgba(35, 35, 35, 0.25) 0%, transparent 45%),
        radial-gradient(ellipse at 10% 90%, rgba(45, 45, 45, 0.15) 0%, transparent 35%);
    pointer-events: none;
    z-index: 0;
}

.portfolio-wrapper > * {
    position: relative;
    z-index: 1;
}

/* ===== HEADER SECTION ===== */
.header {
    text-align: center;
    margin-bottom: 30px;
}

.header-name {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 2px;
    line-height: 1.1;
}

.header-name .first-name {
    color: var(--text-white);
}

.header-name .last-name {
    color: var(--primary-orange);
    font-style: italic;
}

.header-title {
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: var(--text-light);
    margin-top: 5px;
}

/* ===== CARD STYLES ===== */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 22px 28px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(232, 130, 42, 0.08);
}

/* ===== TOP ROW: EDUCATION + PHOTO + CONTACT ===== */
.top-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
}

/* Education Card */
.education-card {
    padding: 20px 24px;
}

.section-title {
    font-size: 1.15rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.section-title .highlight {
    color: var(--primary-orange);
}

.section-title .white {
    color: var(--text-white);
}

.education-year {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 6px;
}

.education-degree {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-white);
    text-transform: uppercase;
    margin-bottom: 2px;
}

.education-uni {
    font-size: 0.78rem;
    color: var(--primary-orange);
    font-style: italic;
    margin-bottom: 2px;
}

.education-role,
.education-location {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Profile Photo */
.profile-photo-container {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 3px solid var(--primary-orange);
    overflow: hidden;
    flex-shrink: 0;
}

.profile-photo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Contact Card */
.contact-card {
    padding: 20px 24px;
}

.contact-card .section-title {
    text-align: left;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 0.72rem;
    color: var(--text-light);
}

.contact-item i {
    color: var(--primary-orange);
    font-size: 0.85rem;
    width: 18px;
    text-align: center;
}

.contact-item a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s;
}

.contact-item a:hover {
    color: var(--primary-orange);
}

/* ===== ABOUT ME SECTION ===== */
.about-card {
    margin-bottom: 20px;
    text-align: center;
    padding: 25px 35px;
}

.about-card .section-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.about-text {
    font-size: 0.82rem;
    color: var(--text-light);
    line-height: 1.7;
    max-width: 650px;
    margin: 0 auto;
}

/* ===== MIDDLE ROW: INTEREST + LAPTOP + LANGUAGES ===== */
.middle-row {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
    align-items: stretch;
}

/* Interest Card */
.interest-card {
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.interest-items {
    display: flex;
    gap: 25px;
    justify-content: center;
    margin-top: auto;
}

.interest-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.interest-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.interest-icon.programming {
    color: #ffd700;
}

.interest-icon.gaming {
    color: var(--primary-orange);
}

.interest-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-align: center;
}

/* Laptop Illustration */
.laptop-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.laptop-illustration {
    width: 100%;
    max-width: 200px;
}

.laptop-svg {
    width: 100%;
    height: auto;
}

/* Language Skills */
.language-card {
    padding: 20px 22px;
}

.language-card .section-title {
    font-size: 1rem;
    margin-bottom: 14px;
}

.language-item {
    margin-bottom: 10px;
}

.language-name {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 4px;
}

.language-bar {
    height: 8px;
    background: rgba(60, 60, 60, 0.5);
    border-radius: 10px;
    overflow: hidden;
}

.language-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1.5s ease;
}

.language-bar-fill.urdu {
    width: 0%;
    background: linear-gradient(90deg, var(--primary-orange), #f5a623);
}

.language-bar-fill.english {
    width: 0%;
    background: linear-gradient(90deg, var(--primary-orange), #f5a623);
}

.language-bar-fill.punjabi {
    width: 0%;
    background: linear-gradient(90deg, var(--primary-orange), #f5a623);
}

/* Animated state */
.language-bar-fill.urdu.animate {
    width: 100%;
}

.language-bar-fill.english.animate {
    width: 75%;
}

.language-bar-fill.punjabi.animate {
    width: 100%;
}

/* ===== PROFESSIONAL SKILLS ===== */
.skills-card {
    margin-bottom: 20px;
    text-align: center;
    padding: 25px 30px;
}

.skills-card .section-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px 30px;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 100px;
    max-width: 130px;
}

.skill-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-light);
    transition: color 0.3s, transform 0.3s;
}

.skill-item:hover .skill-icon {
    color: var(--primary-orange);
    transform: scale(1.15);
}

.skill-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.3;
}

/* ===== WORK EXPERIENCE ===== */
.experience-card {
    padding: 25px 35px;
}

.experience-card .section-title {
    text-align: center;
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.experience-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px 40px;
}

.experience-item h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-white);
    text-transform: uppercase;
    margin-bottom: 3px;
}

.experience-item .exp-role {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary-orange);
    margin-bottom: 10px;
}

.experience-item ul {
    list-style: disc;
    padding-left: 18px;
}

.experience-item ul li {
    font-size: 0.73rem;
    color: var(--text-light);
    margin-bottom: 4px;
    line-height: 1.5;
}

/* ===== PROJECT GALLERY ===== */
.gallery-card {
    margin-top: 20px;
    padding: 25px 30px 30px;
    text-align: center;
}

.gallery-card .section-title {
    font-size: 1.3rem;
    margin-bottom: 6px;
}

.gallery-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 22px;
    letter-spacing: 0.5px;
}

.gallery-project {
    margin-bottom: 10px;
}

.gallery-project-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(232, 130, 42, 0.15);
}

.gallery-project-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-orange), #f5a623);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(232, 130, 42, 0.3);
}

.gallery-project-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-white);
    text-align: left;
}

.gallery-project-tag {
    font-size: 0.68rem;
    color: var(--primary-orange);
    font-weight: 500;
    text-align: left;
    letter-spacing: 0.5px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.gallery-item {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 9 / 16;
    border: 1px solid var(--card-border);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.gallery-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 35px rgba(232, 130, 42, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0.2) 40%,
        transparent 100%
    );
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 18px;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    font-size: 1.3rem;
    color: var(--primary-orange);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.gallery-overlay span {
    font-size: 0.7rem;
    color: #fff;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ===== LIGHTBOX ===== */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    animation: lightboxFadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
}

@keyframes lightboxFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: lightboxZoomIn 0.3s ease;
}

@keyframes lightboxZoomIn {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    transition: color 0.3s, transform 0.3s;
    z-index: 10;
    line-height: 1;
}

.lightbox-close:hover {
    color: var(--primary-orange);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, color 0.3s, transform 0.3s;
    z-index: 10;
}

.lightbox-nav:hover {
    background: var(--primary-orange);
    color: #fff;
    border-color: var(--primary-orange);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-counter {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 2px;
}

/* ===== ANIMATIONS ===== */
.fade-in {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .portfolio-wrapper {
        padding: 25px 15px 40px;
    }

    .header-name {
        font-size: 2rem;
        letter-spacing: 2px;
    }

    .header-title {
        font-size: 0.7rem;
        letter-spacing: 3px;
    }

    .top-row {
        grid-template-columns: 1fr;
        gap: 15px;
        justify-items: center;
    }

    .profile-photo-container {
        order: -1;
        width: 150px;
        height: 150px;
    }

    .education-card,
    .contact-card {
        width: 100%;
    }

    .middle-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .laptop-card {
        order: -1;
    }

    .experience-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .skills-grid {
        gap: 12px 20px;
    }

    .skill-item {
        min-width: 80px;
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .gallery-card {
        padding: 20px 18px 25px;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
}

@media (max-width: 480px) {
    .header-name {
        font-size: 1.6rem;
    }

    .header-title {
        font-size: 0.6rem;
        letter-spacing: 2px;
    }

    .profile-photo-container {
        width: 120px;
        height: 120px;
    }

    .card {
        padding: 18px 20px;
    }

    .about-card {
        padding: 20px;
    }

    .gallery-grid {
        gap: 8px;
    }

    .gallery-project-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .gallery-project-name {
        font-size: 0.85rem;
    }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--marble-dark);
}

::-webkit-scrollbar-thumb {
    background: rgba(232, 130, 42, 0.4);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(232, 130, 42, 0.7);
}

/* ===== CHATBOT STYLES ===== */
.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
}

.chatbot-toggle-btn {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-orange), #ff6b35);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(232, 130, 42, 0.4);
    animation: bounceIcon 2s infinite ease-in-out, pulseShadow 2s infinite;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chatbot-toggle-btn:hover {
    transform: scale(1.1);
}

.chatbot-icon-shape {
    position: relative;
    font-size: 1.4rem;
    color: white;
}

@keyframes bounceIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes pulseShadow {
    0% { box-shadow: 0 0 0 0 rgba(232, 130, 42, 0.6); }
    70% { box-shadow: 0 0 0 15px rgba(232, 130, 42, 0); }
    100% { box-shadow: 0 0 0 0 rgba(232, 130, 42, 0); }
}

.chatbot-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 300px;
    height: 380px;
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--card-border);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.9);
    transform-origin: bottom right;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chatbot-container.active .chatbot-window {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0) scale(1);
}

.chatbot-header {
    background: linear-gradient(135deg, rgba(232, 130, 42, 0.15), rgba(255, 107, 53, 0.05));
    border-bottom: 1px solid rgba(232, 130, 42, 0.2);
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-white);
    font-weight: 600;
}

.chatbot-header-info i {
    color: var(--primary-orange);
    font-size: 1.2rem;
}

.chatbot-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.chatbot-close-btn:hover {
    color: var(--primary-orange);
}

.chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chatbot-messages::-webkit-scrollbar {
    width: 5px;
}
.chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--primary-orange);
    border-radius: 5px;
}

.chatbot-message {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.8rem;
    line-height: 1.4;
    word-wrap: break-word;
    animation: messagePop 0.3s ease-out;
}

@keyframes messagePop {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.chatbot-message.bot {
    align-self: flex-start;
    background: rgba(45, 45, 45, 0.8);
    color: var(--text-white);
    border-bottom-left-radius: 4px;
}

.chatbot-message.user {
    align-self: flex-end;
    background: var(--primary-orange);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chatbot-input {
    display: flex;
    padding: 12px 15px;
    background: rgba(20, 20, 20, 0.8);
    border-top: 1px solid var(--card-border);
    gap: 10px;
}

.chatbot-input input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    color: var(--text-white);
    font-size: 0.8rem;
    outline: none;
    font-family: inherit;
}

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

.chatbot-input button {
    background: none;
    border: none;
    color: var(--primary-orange);
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-input button:hover {
    color: #ff6b35;
    transform: scale(1.1);
}

@media (max-width: 480px) {
    .chatbot-container {
        bottom: 10px;
        right: 10px;
    }
    .chatbot-toggle-btn {
        width: 45px;
        height: 45px;
    }
    .chatbot-icon-shape {
        font-size: 1.1rem;
    }
    .chatbot-window {
        width: calc(100vw - 40px);
        max-width: 270px;
        height: 290px;
        max-height: calc(100vh - 70px);
        bottom: 55px;
        right: 0;
    }
    .chatbot-header {
        padding: 8px 12px;
    }
    .chatbot-header-info {
        font-size: 0.9rem;
    }
    .chatbot-messages {
        padding: 10px;
        gap: 8px;
    }
    .chatbot-message {
        padding: 8px 12px;
        font-size: 0.75rem;
    }
    .chatbot-input {
        padding: 8px 12px;
    }
}
