:root {
    --primary: #bb86fc;
    --primary-light: #d6a4ff;
    --card-bg: rgba(255, 255, 255, 0.05);
    --text: #e8e8e8;
    --bg1: #0d001d;
    --bg2: #23004d;
    --bg3: #000000;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
}

body {
    background: radial-gradient(circle at 30% 20%, var(--bg2) 0%, var(--bg1) 35%, var(--bg3) 100%);
    color: var(--text);
    line-height: 1.6;
    cursor: none;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

h1,
h2,
h3 {
    font-weight: 600;
}

.cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 22px;
    height: 22px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    transition: transform .15s, width .15s, height .15s, border .2s;
}

.cursor.grow {
    width: 44px;
    height: 44px;
    border-width: 3px;
}

header {
    text-align: center;
    padding: 4rem 1rem 3rem;
    background: linear-gradient(135deg, #240046 0%, #3c096c 30%, #5a189a 80%, #10002b 100%);
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
}

header h1 {
    font-size: 3rem;
    margin-bottom: .4rem;
}

header p {
    font-size: 1.15rem;
    opacity: .95;
}


.profile-wrapper {
    position: relative;
    width: 170px;
    height: 170px;
    margin: 0 auto 1.4rem;
}

.profile-wrapper::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-light), var(--primary));
    z-index: -1;
    animation: spin 6s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0);
    }

    to {
        transform: rotate(360deg);
    }
}

.profile-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .55);
    transition: transform .4s;
}

.profile-wrapper:hover img {
    transform: scale(1.06);
}

nav {
    background: rgba(255, 255, 255, .03);
    backdrop-filter: blur(6px);
    position: sticky;
    top: 0;
    z-index: 150;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: .7rem 1rem;
}

nav a {
    margin: .25rem .9rem;
    position: relative;
    font-weight: 600;
    transition: color .25s;
}

nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    height: 2px;
    width: 0;
    background: var(--primary-light);
    transition: width .3s;
}

nav a:hover {
    color: var(--primary);
}

nav a:hover::after {
    width: 100%;
}


section {
    max-width: 1200px;
    margin: 3.5rem auto;
    padding: 0 1.2rem;
}

h2 {
    color: var(--primary);
    margin-bottom: 1.4rem;
    font-size: 2.1rem;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 80px;
    height: 3px;
    background: var(--primary-light);
    border-radius: 2px;
}

.reveal {
    opacity: 0;
    transform: translateY(45px);
    transition: opacity .7s ease-out, transform .7s ease-out;
}

.reveal.show {
    opacity: 1;
    transform: none;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.2rem;
}

.skill-card {
    background: var(--card-bg);
    padding: 1.1rem;
    border-radius: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .6rem;
    transition: transform .4s, box-shadow .4s;
}

.skill-card i {
    font-size: 2.5rem;
    color: var(--primary-light);
}

.skill-card img {
    width: 2.5rem;
    color: var(--primary-light);
}

.skill-card span {
    font-size: .9rem;
    font-weight: 500;
    color: var(--text);
}

.skill-card:hover {
    transform: perspective(900px) rotateX(14deg) rotateY(-14deg) translateY(-8px);
    box-shadow: 0 12px 26px rgba(0, 0, 0, .45);
}


.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.project-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, .4);
    transition: transform .35s ease, box-shadow .35s ease;
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}

.synthera {
    width: max-content !important;
}

.project-card:hover img {
    transform: scale(1.1);
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .45);
}

.project-info {
    padding: 1rem;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    position: absolute;
    bottom: 0;
    width: 100%;
    backdrop-filter: blur(4px);
}

.project-info h4 {
    margin-bottom: .3rem;
    font-size: 1.05rem;
    color: #d6a4ff;
}

.project-info p {
    font-size: .8rem;
    opacity: .9;
}

.tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #bb86fc;
    color: #000;
    padding: .25rem .5rem;
    font-size: .75rem;
    border-radius: 4px;
    font-weight: 600;
}


.exp-item {
    background: var(--card-bg);
    padding: 1.2rem 1.4rem;
    margin-top: 10px;
    border-left: 4px solid var(--primary-light);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, .35);
    transition: transform .3s;
}

.exp-item:hover {
    transform: translateX(6px);
}

ul {
    list-style: disc;
    margin-left: 1.2rem;
    margin-top: .4rem;
}

footer {
    background: #120119;
    text-align: center;
    padding: 1.4rem;
    margin-top: 4rem;
    font-size: .9rem;
    color: #aaa;
}

footer a {
    color: var(--primary-light);
}

#chat-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--primary);
    color: #000;
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    cursor: pointer;
    font-size: 1.4rem;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .4);
    z-index: 300;
}

#chatbox {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 320px;
    max-height: 450px;
    background: #1d1b26;
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .55);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0);
    transform-origin: bottom right;
    transition: transform .25s;
    z-index: 250;
}

#chatbox.open {
    transform: scale(1);
}

.chat-header {
    background: var(--primary);
    padding: .7rem;
    text-align: center;
    font-weight: 600;
}

.messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

.msg {
    padding: .6rem .8rem;
    border-radius: 8px;
    font-size: .85rem;
    line-height: 1.4;
    max-width: 85%;
}

.user {
    align-self: flex-end;
    background: var(--primary-light);
    color: #000;
}

.bot {
    align-self: flex-start;
    background: #2a2834;
    color: var(--text);
}

.chat-input {
    display: flex;
    border-top: 1px solid #333;
}

.chat-input input {
    flex: 1;
    padding: .8rem;
    background: #14131b;
    color: var(--text);
    border: none;
    font-size: .85rem;
}

.chat-input button {
    background: var(--primary);
    border: none;
    padding: .8rem 1rem;
    color: #000;
    font-weight: 600;
    cursor: pointer;
}

.chat-input input:focus {
    outline: none;
}

.ripple {
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--primary-light);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: rippleAnim .65s ease-out forwards;
}

@keyframes rippleAnim {
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(20);
    }
}

#back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    display: none;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s ease;
}

#back-to-top:hover {
    background-color: var(--primary-light);
}

@media(max-width:650px) {
    header h1 {
        font-size: 2.4rem;
    }

    nav a {
        margin: .25rem .5rem;
    }

    #chatbox {
        width: 90vw;
    }
}