* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #d4af37;
    --secondary: #ffd700;
    --accent: #1a1a1a;
    --dark: #0f0f0f;
    --light: #f8fafc;
    --gold-dark: #b8860b;
    --gold-light: #ffd700;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 50%, #2d2d2d 100%);
    color: var(--dark);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Animated Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}

.shape1 {
    width: 300px;
    height: 300px;
    background: var(--primary);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape2 {
    width: 200px;
    height: 200px;
    background: var(--gold-light);
    top: 60%;
    right: 10%;
    animation-delay: 5s;
}

.shape3 {
    width: 250px;
    height: 250px;
    background: var(--secondary);
    bottom: 10%;
    left: 50%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(50px, -50px) scale(1.1); }
    66% { transform: translate(-30px, 30px) scale(0.9); }
}

/* Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

/* Header */
header {
    padding: 10px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
}

header.scrolled {
    background: rgb(255 255 255 / 13%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    width: 100%;
}

.logo {
    font-family: 'Blackletter', 'Old English Text MT', serif;
    font-size: 2.5rem;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s;
    display: flex;
    align-items: center;
}

.logo-img {
    height: 50px;
    width: auto;
    transition: transform 0.3s, filter 0.3s;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

.logo:hover .logo-img {
    transform: scale(1.1);
}

header.scrolled .logo-img {
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.2));
}

header.scrolled .logo {
    color: var(--dark);
    text-shadow: none;
}

.logo:hover {
    transform: scale(1.1);
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    position: relative;
}

header.scrolled .nav-links a {
    color: var(--dark);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    padding: 0;
    z-index: 1001;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background: #b8860b;
    border-radius: 2px;
    transition: all 0.3s ease;
}

header.scrolled .hamburger-line {
    background: var(--dark);
}

.hamburger.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(10px, 10px);
}

.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Navigation */
@media (max-width: 768px) {
    nav.container {
        max-width: 100%;
        padding: 0 20px;
    }

    .hamburger {
        display: flex;
    }

    .nav-links {
        display: flex !important;
        position: fixed !important;
        top: 70px;
        left: 0;
        right: 0;
        width: 100%;
        background: rgb(15 23 42 / 15%);
        backdrop-filter: blur(10px);
        flex-direction: column !important;
        gap: 0 !important;
        list-style: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        z-index: 999;
    }

    header.scrolled .nav-links {
        background: rgba(255, 255, 255, 0.192);
    }

    .nav-links.active {
        max-height: 400px;
    }

    .nav-links li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    header.scrolled .nav-links li {
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }

    .nav-links a {
        display: block;
        padding: 15px 20px;
        text-align: left;
    }

    header.scrolled .nav-links a {
        color: var(--dark);
    }

    .nav-links a::after {
        display: none;
    }

    .nav-links a:hover {
        background: rgba(99, 102, 241, 0.2);
    }
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--primary);
    padding-top: 80px;
    background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
}

.hero-content {
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    font-weight: 800;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
    color: var(--primary);
    letter-spacing: 2px;
}

.hero .subtitle {
    font-size: 1.5rem;
    margin-bottom: 30px;
    opacity: 0.9;
    color: var(--secondary);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
}

.cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--dark);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.4);
    border: 2px solid var(--primary);
}

.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.6);
    background: linear-gradient(135deg, var(--secondary), var(--primary));
}

/* Section Styles */
section {
    padding: 100px 0;
    position: relative;
}

section:nth-child(even) {
    background: rgba(248, 250, 252, 0.05);
}

section:nth-child(odd) {
    background: rgba(212, 175, 55, 0.02);
}

.section-title {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 60px;
    color: var(--primary);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.6);
}

/* About Section */
.about-content {
    display: flex;
    gap: 50px;
    align-items: center;
    flex-wrap: wrap;
}

.about-image {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
}

.profile-card {
    width: 300px;
    height: 300px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.profile-card::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--gold-dark));
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.profile-card::after {
    content: '👨‍💻';
    position: relative;
    z-index: 1;
}

.about-text {
    flex: 2;
    min-width: 300px;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #e0e0e0;
    margin-bottom: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.stat-card {
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.stat-label {
    font-size: 0.9rem;
    color: #a0a0a0;
    text-transform: uppercase;
    font-weight: 600;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.skill-category {
    padding: 30px;
    border-radius: 20px;
    transition: all 0.3s;
}

.skill-category:hover {
    transform: translateY(-10px);
}

.skill-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.skill-category h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--dark);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.1);
    border: 2px solid var(--primary);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    transition: all 0.3s;
}

.skill-tag:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    cursor: pointer;
    background: white;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.project-card-header {
    height: 200px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--dark);
    position: relative;
    overflow: hidden;
}

.project-card-header::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    animation: ripple 3s infinite;
}

@keyframes ripple {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

.project-card-body {
    padding: 25px;
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--dark);
}

.project-card p {
    color: #64748b;
    margin-bottom: 20px;
    line-height: 1.6;
}

.platform-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.platform-tag {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.platform-web { background: rgba(99, 102, 241, 0.1); color: var(--primary); }
.platform-mobile { background: rgba(236, 72, 153, 0.1); color: var(--secondary); }
.platform-dashboard { background: rgba(16, 185, 129, 0.1); color: var(--accent); }

.project-link {
    display: inline-block;
    padding: 10px 25px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--dark);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s;
    margin-right: 10px;
    margin-bottom: 10px;
    border: 2px solid var(--primary);
}

.project-link:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.6);
}

/* Testimonials */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.testimonial-card {
    padding: 35px;
    border-radius: 20px;
    transition: all 0.3s;
    position: relative;
}

.testimonial-card:hover {
    transform: translateY(-10px);
}

.quote-icon {
    font-size: 3rem;
    color: var(--primary);
    opacity: 0.3;
    position: absolute;
    top: 20px;
    left: 20px;
}

.testimonial-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--dark);
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--dark);
    font-weight: bold;
}

.author-info h4 {
    color: var(--dark);
    margin-bottom: 5px;
}

.author-info p {
    color: #64748b;
    font-size: 0.9rem;
}

.stars {
    color: #fbbf24;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

/* Contact Section */
.contact-info {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
}

.contact-item {
    text-align: center;
    padding: 30px;
    border-radius: 15px;
    transition: all 0.3s;
    min-width: 250px;
}

.contact-item:hover {
    transform: translateY(-5px);
}

.contact-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.contact-item h3 {
    margin-bottom: 10px;
    color: var(--dark);
}

.contact-item a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.contact-item a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    text-align: center;
    padding: 30px 0;
}

/* Scroll animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero .subtitle {
        font-size: 1.2rem;
    }

    .nav-links {
        display: none;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 2rem;
    }

    .about-content {
        flex-direction: column;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .hero .subtitle {
        font-size: 1rem;
    }

    .cta-button {
        padding: 12px 30px;
        font-size: 0.95rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    .nav-links {
        gap: 15px;
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .skill-category {
        padding: 20px;
    }

    .contact-info {
        flex-direction: column;
        gap: 20px;
    }
}

/* Back-to-Top Button */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--dark);
    border: 2px solid var(--primary);
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 999;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px 0 rgba(212, 175, 55, 0.4);
    backdrop-filter: blur(4px);
}

.back-to-top.show {
    display: flex;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 48px 0 rgba(212, 175, 55, 0.6);
    background: linear-gradient(135deg, var(--secondary), var(--primary));
}

/* Trailing Ball Effect */
.trailing-ball {
    position: fixed;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle at 30% 30%, var(--gold-light), var(--primary));
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    box-shadow: 0 0 12px var(--primary), 0 0 25px rgba(212, 175, 55, 0.7);
    animation: trailingPulse 0.8s ease-out forwards;
}

@keyframes trailingPulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0);
    }
}

/* Trailing track line */
.trailing-track {
    position: fixed;
    left: 50%;
    top: 0;
    width: 40px;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
    transform: translateX(-50%);
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 15px,
            var(--primary) 15px,
            var(--primary) 25px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 15px,
            var(--secondary) 15px,
            var(--secondary) 25px
        );
    background-size: 100% 80px, 100% 80px;
    background-position: 0 0, 0 40px;
    -webkit-mask-image: 
        linear-gradient(0deg, 
            transparent 0%,
            var(--primary) 10%,
            var(--primary) 90%,
            transparent 100%
        );
    mask-image: 
        linear-gradient(0deg, 
            transparent 0%,
            var(--primary) 10%,
            var(--primary) 90%,
            transparent 100%
        );
}

.trailing-track::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 20px,
            rgba(212, 175, 55, 0.3) 20px,
            rgba(212, 175, 55, 0.3) 30px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 20px,
            rgba(255, 215, 0, 0.3) 20px,
            rgba(255, 215, 0, 0.3) 30px
        );
    animation: zigzag 4s ease-in-out infinite;
}

@keyframes zigzag {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(15px); }
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .trailing-track {
        display: none;
    }
}
