/* GLOBAL STYLES & VARIABLES*/

:root {
    --primary-color: #6366f1;
    --secondary-color: #ec4899;
    --dark-bg: #0f172a;
    --card-bg: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --border-color: #334155;
    --success-color: #10b981;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* TYPOGRAPHY */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 1rem;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    margin: 1rem auto 0;
    border-radius: 2px;
}

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

/* BUTTONS */

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* NAVIGATION */

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 5px 0;
    transition: var(--transition);
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(10px, 10px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* HERO SECTION  */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.stars {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0.1;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, #eee, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 60% 70%, #fff, rgba(0,0,0,0));
    background-size: 200px 200px;
    animation: twinkle 5s infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.3; }
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: slideInLeft 1s ease-out;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    animation: slideInLeft 1s ease-out 0.2s both;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    animation: slideInLeft 1s ease-out 0.4s both;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    animation: slideInLeft 1s ease-out 0.6s both;
}

.hero-image {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: slideInRight 1s ease-out;
}

.floating-card {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: white;
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.3);
    animation: float 3s ease-in-out infinite;
}

/* PROFILE CARD */

.profile-card {
    position: relative;
    width: 280px;
    padding: 2rem 1.5rem 1.5rem;
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    animation: float 3s ease-in-out infinite;
    overflow: visible;
}

.profile-ring {
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 3px solid transparent;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: ringPulse 2s ease-in-out infinite;
}

.profile-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--card-bg);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
    position: relative;
    z-index: 1;
    margin-top: -10px;
}

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

.profile-info {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.profile-name {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 0;
}

.profile-role {
    font-size: 0.85rem;
    color: var(--primary-color);
    margin-bottom: 0;
    font-weight: 600;
}

.profile-status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.3rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success-color);
    border-radius: 50%;
    animation: statusPulse 1.5s ease-in-out infinite;
}

.status-text {
    font-size: 0.75rem;
    color: var(--success-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-decoration {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.deco-1 {
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15), transparent 70%);
    top: -20px;
    right: -20px;
    animation: decoFloat 4s ease-in-out infinite;
}

.deco-2 {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.15), transparent 70%);
    bottom: -15px;
    left: -15px;
    animation: decoFloat 3s ease-in-out infinite 0.5s;
}

.deco-3 {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1), transparent 70%);
    top: 50%;
    left: -25px;
    animation: decoFloat 3.5s ease-in-out infinite 1s;
}

@keyframes ringPulse {
    0%, 100% { opacity: 1; transform: translateX(-50%) scale(1); }
    50% { opacity: 0.7; transform: translateX(-50%) scale(1.05); }
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { opacity: 0.8; box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

@keyframes decoFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-8px) scale(1.1); }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* ABOUT SECTION */

.about {
    padding: 6rem 0;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.05), rgba(236, 72, 153, 0.05));
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text p {
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.stat h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

.about-image {
    display: flex;
    justify-content: center;
}

.image-box {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    color: white;
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.3);
    animation: float 3s ease-in-out infinite;
}

/*  PROJECTS SECTION */

.projects {
    padding: 6rem 0;
    background: var(--dark-bg);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 2rem;
    transition: var(--transition);
    overflow: hidden;
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
    border-color: var(--primary-color);
}

.project-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    margin-bottom: 1.5rem;
}

.project-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.project-card p {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.project-link:hover {
    gap: 1rem;
    color: var(--secondary-color);
}

/*  SKILLS SECTION */

.skills {
    padding: 6rem 0;
    background: linear-gradient(180deg, rgba(236, 72, 153, 0.05), rgba(99, 102, 241, 0.05));
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.skill-category:hover {
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.1);
}

.skill-category h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.skill-category i {
    font-size: 1.3rem;
}

.skill-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skill-item span {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.skill-bar {
    width: 100%;
    height: 8px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    animation: progressBar 1.5s ease-out;
}

@keyframes progressBar {
    from {
        width: 0 !important;
    }
}

/*  CONTACT SECTION */

.contact {
    padding: 6rem 0;
    background: var(--dark-bg);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.contact-details {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 0.5rem;
}

.contact-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.contact-item a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

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

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-link {
    width: 50px;
    height: 50px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-secondary);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.contact-form button {
    align-self: flex-start;
}

/*  FOOTER */

.footer {
    background: rgba(30, 41, 59, 0.8);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    text-align: center;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer p {
    margin-bottom: 0;
    color: var(--text-secondary);
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* RESPONSIVE DESIGN */

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--dark-bg);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        gap: 0;
        padding: 2rem 0;
        z-index: 999;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        padding: 1rem 0;
        border-bottom: 1px solid var(--border-color);
    }

    .hero .container {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-image {
        display: none;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .footer .container {
        flex-direction: column;
        gap: 1rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }

    #particleCanvas {
        display: none;
    }
    .cursor-glow {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .about-stats {
        gap: 1rem;
    }

    .stat h3 {
        font-size: 1.5rem;
    }
}

/* ==========================================
   INTERACTIVE FEATURES
   ========================================== */

/* SCROLL PROGRESS BAR */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    background-size: 200% 100%;
    z-index: 10000;
    transition: width 0.1s ease-out;
    animation: gradientShift 2s linear infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* CURSOR GLOW */
.cursor-glow {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.4), transparent 70%);
    pointer-events: none;
    z-index: 9998;
    transition: transform 0.15s ease-out, opacity 0.3s;
    mix-blend-mode: screen;
    opacity: 0;
}

.cursor-glow.active {
    opacity: 1;
}

/* PARTICLE CANVAS */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.3;
}

/* THEME TOGGLE */
.theme-toggle {
    position: fixed;
    bottom: 90px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: var(--transition);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.theme-toggle:hover {
    transform: rotate(30deg) scale(1.1);
    border-color: var(--primary-color);
}

.theme-icon-moon {
    display: none;
}

body.light-theme .theme-icon-sun {
    display: none;
}

body.light-theme .theme-icon-moon {
    display: inline;
}

/* LIGHT THEME */
body.light-theme {
    --dark-bg: #f1f5f9;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --border-color: #e2e8f0;
}

body.light-theme .navbar {
    background: rgba(241, 245, 249, 0.95);
    border-bottom-color: #e2e8f0;
}

body.light-theme .nav-menu {
    background: #f1f5f9;
}

body.light-theme .footer {
    background: rgba(255, 255, 255, 0.8);
}

/* GLITCH EFFECT */
.glitch {
    position: relative;
    display: inline-block;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.glitch:hover::before {
    animation: glitch-1 0.3s linear infinite;
    color: var(--secondary-color);
    opacity: 0.8;
    clip-path: inset(20% 0 30% 0);
}

.glitch:hover::after {
    animation: glitch-2 0.3s linear infinite reverse;
    color: var(--primary-color);
    opacity: 0.8;
    clip-path: inset(60% 0 10% 0);
}

@keyframes glitch-1 {
    0% { transform: translate(0); }
    20% { transform: translate(-3px, 3px); }
    40% { transform: translate(-3px, -3px); }
    60% { transform: translate(3px, 3px); }
    80% { transform: translate(3px, -3px); }
    100% { transform: translate(0); }
}

@keyframes glitch-2 {
    0% { transform: translate(0); }
    20% { transform: translate(3px, -3px); }
    40% { transform: translate(3px, 3px); }
    60% { transform: translate(-3px, -3px); }
    80% { transform: translate(-3px, 3px); }
    100% { transform: translate(0); }
}

/* TYPING CURSOR */
.typing-cursor {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 700;
    animation: blink 0.8s step-end infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ANIMATED GRADIENT BORDER ON PROFILE CARD */
.profile-card {
    position: relative;
    background: var(--card-bg);
}

.profile-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 22px;
    background: conic-gradient(from var(--angle, 0deg), var(--primary-color), var(--secondary-color), #10b981, var(--primary-color));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: rotateBorder 3s linear infinite;
}

.profile-card:hover::before {
    opacity: 1;
}

@property --angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

@keyframes rotateBorder {
    to { --angle: 360deg; }
}

/* Fallback for browsers without @property support */
@supports not (background: conic-gradient(from 0deg, red, blue)) {
    @keyframes rotateBorderFallback {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }
    .profile-card::before {
        animation: rotateBorderFallback 3s linear infinite;
    }
}

/* SKILL BAR TOOLTIP */
.skill-bar {
    position: relative;
    cursor: pointer;
}

.skill-bar::after {
    content: attr(data-percent) '%';
    position: absolute;
    top: -30px;
    right: 0;
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    opacity: 0;
    transform: translateY(5px);
    transition: all 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.skill-bar:hover::after {
    opacity: 1;
    transform: translateY(0);
}

/* MAGNETIC BUTTONS */
.btn {
    position: relative;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

/* PROJECT CARD TILT */
.project-card {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.project-card .project-image {
    transition: transform 0.3s ease;
}

.project-card:hover .project-image {
    transform: translateZ(20px);
}

/* STAT CARD HOVER */
.stat {
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: default;
}

.stat:hover {
    transform: translateY(-8px) scale(1.05);
    border-color: var(--primary-color);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.15);
}

/* CONTACT ITEM HOVER */
.contact-item {
    transition: all 0.3s ease;
    padding: 0.8rem;
    border-radius: 10px;
}

.contact-item:hover {
    background: rgba(99, 102, 241, 0.05);
    transform: translateX(5px);
}

/* SOCIAL LINK GLOW */
.social-link-item {
    width: 50px;
    height: 50px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
}

.social-link-item::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.social-link-item:hover {
    color: white;
    border-color: transparent;
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.social-link-item:hover::before {
    opacity: 1;
}

/* SECTION REVEAL */
.reveal-section {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

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

.reveal-section:nth-child(2) { transition-delay: 0.1s; }
.reveal-section:nth-child(3) { transition-delay: 0.2s; }

/* TOAST NOTIFICATIONS */
.toast-container {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: toastIn 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    max-width: 320px;
}

.toast.success { border-left-color: var(--success-color); }
.toast.info { border-left-color: var(--primary-color); }
.toast.welcome { border-left-color: var(--secondary-color); }

.toast-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.toast.removing {
    animation: toastOut 0.3s ease-in forwards;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastOut {
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

/* TIME ON PAGE */
.time-on-page {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.time-label {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.time-value {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
}

/* FORM FOCUS ANIMATION */
.form-group {
    position: relative;
}

.form-group label {
    transition: color 0.3s ease;
}

.form-group:focus-within label {
    color: var(--primary-color);
}

/* IMAGE BOX TILT */
.image-box {
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: pointer;
}

.image-box:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 30px 80px rgba(99, 102, 241, 0.4);
}

/* NAV LINK RIPPLE */
.nav-link {
    position: relative;
    overflow: hidden;
}

/* TAG HOVER */
.tag {
    transition: all 0.3s ease;
    cursor: default;
}

.tag:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

/* LOADING SCREEN */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* SCROLL INDICATOR */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    animation: bounce 2s ease-in-out infinite;
    z-index: 1;
}

.scroll-indicator span {
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    transform: rotate(45deg);
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}
