
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #6385e5;
    --secondary: #9c91df;
    --dark: #202b45;
    --text: #536078;
    --muted: #8994a9;
    --light: #f6f8ff;
    --white: #ffffff;
    --border: #e8ecf5;
    --shadow: 0 15px 45px rgba(49, 72, 125, .09);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.7;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: min(1160px, 92%);
    margin: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border);
}

.navbar {
    min-height: 78px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo {
    font: 800 25px 'Manrope', sans-serif;
    letter-spacing: -1px;
}

.logo span {
    color: var(--primary);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 19px;
}

.nav-menu a {
    font-size: 12px;
    font-weight: 700;
    color: #65718a;
    transition: .3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary);
}

.nav-menu a.active {
    border-bottom: 2px solid var(--primary);
    padding-bottom: 7px;
}

.nav-contact {
    background: #edf2ff;
    color: var(--primary) !important;
    padding: 10px 17px;
    border-radius: 30px;
}

.menu-toggle {
    display: none;
    background: none;
    border: 0;
    font-size: 25px;
    cursor: pointer;
    color: var(--dark);
}

.hero {
    padding: 90px 0;
    background:
        radial-gradient(circle at 85% 15%, #e8e4ff, transparent 30%),
        radial-gradient(circle at 10% 90%, #e5efff, transparent 30%),
        linear-gradient(120deg, #fbfcff, #f0f4ff);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    align-items: center;
    gap: 50px;
}

.eyebrow {
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
}

.hero h1 {
    font: 800 clamp(42px, 5vw, 66px)/1.17 'Manrope', sans-serif;
    margin: 22px 0;
    letter-spacing: -2px;
}

.gradient-text {
    background: linear-gradient(100deg, #557ce0, #a18edb);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-description {
    color: var(--text);
    font-size: 15px;
    max-width: 600px;
    line-height: 1.9;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 13px;
    margin-top: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 22px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    transition: .3s;
    cursor: pointer;
    border: 0;
}

.btn:hover {
    transform: translateY(-4px);
}

.btn-primary {
    background: linear-gradient(110deg, #5d80df, #938fe0);
    color: white;
    box-shadow: 0 10px 25px #6888df40;
}

.btn-outline {
    background: white;
    color: var(--primary);
    border: 1px solid var(--border);
}

.hero-image-wrap {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 430px;
}

.hero-image {
    width: 310px;
    height: 390px;
    object-fit: cover;
    object-position: center top;
    border-radius: 160px 160px 28px 28px;
    border: 10px solid white;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 2;
}

.image-circle {
    position: absolute;
    width: 390px;
    height: 390px;
    border: 1px solid #b9c7ef;
    border-radius: 50%;
}

.float-info {
    position: absolute;
    z-index: 3;
    background: white;
    box-shadow: var(--shadow);
    padding: 13px 17px;
    border-radius: 13px;
    font-size: 12px;
    font-weight: 700;
    animation: floating 4s infinite ease-in-out;
}

.float-one {
    left: 0;
    top: 85px;
}

.float-two {
    right: 0;
    bottom: 75px;
    animation-delay: 1s;
}

@keyframes floating {
    50% { transform: translateY(-10px); }
}

.hero-stats {
    display: flex;
    gap: 35px;
    margin-top: 38px;
    flex-wrap: wrap;
}

.hero-stats strong {
    display: block;
    font: 800 25px 'Manrope';
}

.hero-stats small {
    color: var(--muted);
    font-size: 10px;
}

.section {
    padding: 85px 0;
}

.section-white {
    background: white;
}

.section-heading {
    margin-bottom: 38px;
}

.section-heading h2 {
    font: 800 clamp(30px, 4vw, 43px)/1.25 'Manrope';
    margin: 12px 0;
}

.section-heading p {
    color: var(--text);
    font-size: 14px;
    max-width: 600px;
}

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

.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 27px;
    transition: .3s;
}

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

.card-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #edf2ff;
    color: var(--primary);
    font-size: 23px;
    margin-bottom: 20px;
}

.card h3 {
    font: 700 19px 'Manrope';
    margin-bottom: 12px;
}

.card p {
    font-size: 13px;
    color: var(--text);
}

.page-banner {
    padding: 75px 0 55px;
    background: linear-gradient(120deg, #f4f7ff, #f1edff);
}

.page-banner h1 {
    font: 800 clamp(38px, 5vw, 57px)/1.2 'Manrope';
    margin: 15px 0;
}

.page-banner p {
    color: var(--text);
    max-width: 680px;
    font-size: 14px;
}

.about-grid {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: 55px;
    align-items: center;
}

.about-photo {
    padding: 15px;
    background: linear-gradient(140deg, #e9efff, #f4edff);
    border-radius: 22px;
}

.about-photo img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    object-position: top;
    border-radius: 15px;
}

.about-content p {
    color: var(--text);
    font-size: 14px;
    margin: 15px 0;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 20px 0;
}

.tag-list span {
    background: #edf2ff;
    padding: 7px 13px;
    border-radius: 30px;
    font-size: 11px;
    color: #5d76c4;
    font-weight: 700;
}

.skill-box {
    background: white;
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: 18px;
}

.skill-box h3 {
    font: 700 19px 'Manrope';
    margin-bottom: 17px;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.skill-list span {
    background: #f0f3fc;
    padding: 9px 13px;
    border-radius: 8px;
    color: #586985;
    font-size: 11px;
    font-weight: 600;
}

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

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

.project-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 17px;
    overflow: hidden;
    transition: .3s;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.project-image {
    height: 190px;
    display: grid;
    place-items: center;
    color: white;
    font: 800 25px 'Manrope';
    text-align: center;
    padding: 20px;
}

.project-content {
    padding: 22px;
}

.project-content small {
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
}

.project-content h3 {
    font: 700 18px 'Manrope';
    margin: 10px 0;
}

.project-content p {
    font-size: 12px;
    color: var(--text);
}

.timeline {
    max-width: 900px;
    margin: auto;
}

.timeline-item {
    position: relative;
    padding: 0 0 30px 35px;
    border-left: 2px solid #dce4f8;
    margin-left: 10px;
}

.timeline-item:before {
    content: "";
    position: absolute;
    left: -8px;
    top: 5px;
    width: 14px;
    height: 14px;
    background: var(--primary);
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 3px #e8edff;
}

.timeline-content {
    background: white;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 16px;
}

.timeline-content h3 {
    font: 700 20px 'Manrope';
}

.timeline-content h4 {
    color: var(--primary);
    font-size: 13px;
    margin: 6px 0;
}

.timeline-content small {
    color: var(--muted);
}

.timeline-content p {
    color: var(--text);
    font-size: 13px;
    margin-top: 12px;
}

.education-card,
.achievement-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 27px;
}

.contact-grid {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: 45px;
}

.contact-detail {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    align-items: center;
}

.contact-detail strong {
    display: block;
    font-size: 13px;
}

.contact-detail small {
    color: var(--muted);
}

.contact-form {
    background: white;
    border: 1px solid var(--border);
    padding: 30px;
    border-radius: 20px;
}

.contact-form label {
    display: block;
    margin: 14px 0 6px;
    font-size: 12px;
    font-weight: 700;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 9px;
    outline: none;
    background: #fafbff;
    font: inherit;
    font-size: 13px;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary);
}

.contact-form textarea {
    resize: vertical;
}

.cta-section {
    padding: 50px;
    background: linear-gradient(110deg, #6385e5, #a195df);
    border-radius: 22px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
}

.cta-section h2 {
    font: 800 32px 'Manrope';
}

.footer {
    background: #202b45;
    color: white;
    padding: 50px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 35px;
}

.footer p,
.footer a {
    color: #b9c3d7;
    font-size: 12px;
}

.footer h3 {
    font: 700 15px 'Manrope';
    margin-bottom: 15px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-bottom {
    border-top: 1px solid #ffffff20;
    padding-top: 18px;
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #aab5ca;
}

.back-top {
    position: fixed;
    bottom: 22px;
    right: 22px;
    width: 43px;
    height: 43px;
    border: 0;
    border-radius: 13px;
    background: var(--primary);
    color: white;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: .3s;
    z-index: 100;
}

.back-top.show {
    opacity: 1;
    pointer-events: auto;
}

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: .7s;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

@media(max-width:1050px) {
    .nav-menu { gap: 10px; }
    .nav-menu a { font-size: 10px; }
}

@media(max-width:850px) {
    .menu-toggle { display: block; }
    .nav-menu {
        display: none;
        position: absolute;
        top: 78px;
        left: 0;
        right: 0;
        background: white;
        padding: 25px;
        flex-direction: column;
        align-items: flex-start;
        box-shadow: var(--shadow);
    }
    .nav-menu.open { display: flex; }
    .hero-grid,.about-grid,.contact-grid { grid-template-columns: 1fr; }
    .hero-image-wrap { margin-top: 30px; }
    .card-grid,.project-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media(max-width:560px) {
    .hero { padding: 60px 0; }
    .hero h1 { font-size: 42px; }
    .hero-image { width: 270px; height: 340px; }
    .image-circle { width: 320px; height: 320px; }
    .hero-image-wrap { min-height: 370px; }
    .card-grid,.project-grid,.skills-grid { grid-template-columns: 1fr; }
    .section { padding: 60px 0; }
    .page-banner { padding: 55px 0 40px; }
    .cta-section { padding: 28px; flex-direction: column; align-items: flex-start; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 8px; }
}

@media(prefers-reduced-motion:reduce) {
    *,*::before,*::after {
        animation:none !important;
        transition:none !important;
        scroll-behavior:auto !important;
    }
    .reveal { opacity:1; transform:none; }
}

/* ==============================
   SHOW MORE PROJECTS BUTTON
============================== */

.show-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 42px;
}

.show-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    transition: all .3s ease;
}

.show-more-btn span {
    font-size: 20px;
    line-height: 1;
}

.show-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(99, 133, 229, .22);
}


/* ==============================
   PROJECTS POPUP MODAL
============================== */

.projects-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
}

.projects-modal.active {
    opacity: 1;
    visibility: visible;
}

.projects-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(20, 29, 51, .72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.projects-modal-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1180px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--white);
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 22px;
    box-shadow: 0 25px 80px rgba(12, 23, 49, .25);
    transform: translateY(25px) scale(.98);
    transition: transform .3s ease;
}

.projects-modal.active .projects-modal-content {
    transform: translateY(0) scale(1);
}


/* Modal Header */

.projects-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding: 28px 32px 24px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(120deg, #f8faff, #f5f3ff);
}

.projects-modal-header h2 {
    margin: 8px 0;
    color: var(--dark);
    font-size: clamp(25px, 3vw, 34px);
}

.projects-modal-header p {
    margin: 0;
    color: var(--text);
    font-size: 14px;
}

.modal-close {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--white);
    color: var(--dark);
    font-size: 27px;
    cursor: pointer;
    transition: all .25s ease;
}

.modal-close:hover {
    background: var(--primary);
    color: #fff;
    transform: rotate(90deg);
}


/* Scrollable Project Area */

.projects-modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 28px 32px;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) #edf0f8;
}

.projects-modal-body::-webkit-scrollbar {
    width: 8px;
}

.projects-modal-body::-webkit-scrollbar-track {
    background: #edf0f8;
    border-radius: 10px;
}

.projects-modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--primary), var(--secondary));
    border-radius: 10px;
}

.projects-modal-body .project-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}


/* Modal Footer */

.projects-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 16px 32px;
    border-top: 1px solid var(--border);
    background: #fafbff;
}

.projects-modal-footer span {
    color: var(--muted);
    font-size: 13px;
}


/* Project Image Support */

.project-card img {
    display: block;
    width: 100%;
    height: 190px;
    object-fit: cover;
}

.project-image-placeholder {
    height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e9efff, #eeeaff);
    color: var(--primary);
    font-size: 42px;
    font-weight: 700;
}


/* Prevent Background Scrolling */

body.modal-open {
    overflow: hidden;
}


/* Responsive */

@media (max-width: 900px) {
    .projects-modal-body .project-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .projects-modal {
        padding: 10px;
    }

    .projects-modal-content {
        max-height: 94vh;
        border-radius: 17px;
    }

    .projects-modal-header {
        padding: 20px 18px;
    }

    .projects-modal-body {
        padding: 18px;
    }

    .projects-modal-body .project-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .projects-modal-footer {
        padding: 14px 18px;
    }
}


/* =========================================
   PROJECT MODAL VISIBILITY FIX
========================================= */

.projects-modal .project-card.reveal {
    opacity: 1;
    visibility: visible;
    transform: none;
}

/* Modal smooth scrolling */
.projects-modal-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Prevent horizontal overflow */
.projects-modal-content,
.projects-modal-body {
    min-width: 0;
}

.projects-modal .project-grid {
    width: 100%;
}

