/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-cyan: #00d4ff;
    --secondary-cyan: #00bcd4;
    --dark-bg: #0a0e27;
    --darker-bg: #060818;
    --card-bg: rgba(15, 20, 40, 0.85);
    --secondary-dark: #1a1f3a;
    --light-text: #f5f5f5;
    --gray-text: #b8b8b8;
    --border-color: rgba(0, 212, 255, 0.2);
    --border-hover: rgba(0, 212, 255, 0.5);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #060818 0%, #0a0e27 50%, #0d1230 100%);
    background-attachment: fixed;
    color: var(--light-text);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* ============================================
   STARFIELD BACKGROUND
   ============================================ */
#stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--primary-cyan);
    border-radius: 50%;
    box-shadow: 0 0 4px var(--primary-cyan);
    animation: twinkle 3s infinite ease-in-out;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.2;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.3);
    }
}

/* ============================================
   PAGE TRANSITIONS
   ============================================ */
.page-content {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.1s forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-cyan);
    text-decoration: none;
    transition: all 0.3s ease;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.logo:hover {
    transform: scale(1.05);
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.8);
}

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

.nav-link {
    color: var(--light-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding-bottom: 5px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-cyan);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px var(--primary-cyan);
}

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

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

/* ============================================
   LAYOUT
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

main {
    position: relative;
    z-index: 1;
}

section {
    min-height: calc(100vh - 80px);
    padding: 6rem 2rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-title {
    font-size: 3rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
    color: var(--light-text);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--primary-cyan);
    border-radius: 2px;
    box-shadow: 0 0 15px var(--primary-cyan);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.hero-profile {
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease-out 0.3s backwards;
}

.profile-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-cyan);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.6),
                0 0 60px rgba(0, 212, 255, 0.4);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-image:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.8),
                0 0 80px rgba(0, 212, 255, 0.6);
}

.hero-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3rem 4rem;
    max-width: 700px;
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.15);
    transition: all 0.4s ease;
    animation: fadeInUp 0.8s ease-out 0.5s backwards;
}

.hero-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 12px 40px rgba(0, 212, 255, 0.25);
}

.greeting {
    font-size: 2.5rem;
    color: var(--light-text);
    font-weight: 300;
    margin-bottom: 1rem;
}

.name {
    color: var(--primary-cyan);
    font-weight: 600;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.6),
                 0 0 40px rgba(0, 212, 255, 0.4);
    animation: glow 2.5s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 20px rgba(0, 212, 255, 0.6),
                     0 0 40px rgba(0, 212, 255, 0.4);
    }
    to {
        text-shadow: 0 0 30px rgba(0, 212, 255, 0.8),
                     0 0 50px rgba(0, 212, 255, 0.6),
                     0 0 80px rgba(0, 212, 255, 0.4);
    }
}

.tagline {
    font-size: 1.3rem;
    color: var(--primary-cyan);
    font-weight: 400;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}

.description {
    font-size: 1rem;
    color: var(--gray-text);
    line-height: 1.8;
}

/* ============================================
   PROJECTS SECTION
   ============================================ */
.projects-section {
    min-height: 100vh;
}

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

.category-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.category-card:nth-child(1) { animation-delay: 0.1s; }
.category-card:nth-child(2) { animation-delay: 0.2s; }
.category-card:nth-child(3) { animation-delay: 0.3s; }

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.category-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--border-hover);
    box-shadow: 0 15px 50px rgba(0, 212, 255, 0.3),
                0 0 30px rgba(0, 212, 255, 0.2);
}

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

.category-icon {
    color: var(--primary-cyan);
    margin-bottom: 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-card:hover .category-icon {
    transform: scale(1.1) translateY(-5px);
    filter: drop-shadow(0 0 15px rgba(0, 212, 255, 0.8));
}

.category-card h3 {
    color: var(--primary-cyan);
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.category-card:hover h3 {
    transform: translateY(-2px);
}

.category-card p {
    color: var(--gray-text);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ============================================
   PROJECTS LIST
   ============================================ */
.projects-list {
    animation: fadeInUp 0.5s ease-out;
}

.back-btn {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    color: var(--primary-cyan);
    padding: 0.9rem 1.8rem;
    border-radius: 12px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 2.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.back-btn:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--border-hover);
    transform: translateX(-8px);
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.2);
}

.back-btn svg {
    transition: transform 0.3s ease;
}

.back-btn:hover svg {
    transform: translateX(-4px);
}

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

.project-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    cursor: pointer;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--border-hover);
    box-shadow: 0 15px 50px rgba(0, 212, 255, 0.3);
}

.project-image {
    height: 200px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2) 0%, rgba(0, 188, 212, 0.2) 100%);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-cyan);
    font-weight: 600;
    font-size: 1.1rem;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(4px);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-info {
    padding: 1.75rem;
}

.project-info h3 {
    color: var(--light-text);
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.project-card:hover .project-info h3 {
    color: var(--primary-cyan);
}

.project-info p {
    color: var(--gray-text);
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.tag {
    background: rgba(0, 212, 255, 0.15);
    color: var(--primary-cyan);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(0, 212, 255, 0.3);
    transition: all 0.3s ease;
}

.tag:hover {
    background: rgba(0, 212, 255, 0.25);
    border-color: var(--primary-cyan);
    transform: translateY(-2px);
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-section {
    min-height: 100vh;
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-text h3 {
    font-size: 2rem;
    color: var(--primary-cyan);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.about-text p {
    color: var(--gray-text);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.skills {
    margin-top: 4rem;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3rem;
}

.skills h4 {
    font-size: 1.8rem;
    color: var(--light-text);
    margin-bottom: 2rem;
    font-weight: 600;
}

.skills-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

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

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.skill-name {
    color: var(--light-text);
    font-weight: 500;
    font-size: 1.05rem;
}

.skill-percentage {
    color: var(--primary-cyan);
    font-weight: 600;
    font-size: 0.95rem;
}

.skill-bar {
    height: 12px;
    background: rgba(26, 31, 58, 0.8);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-cyan) 0%, var(--primary-cyan) 100%);
    border-radius: 10px;
    width: 0;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.6);
    position: relative;
}

.skill-progress::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.skill-progress.animated {
    width: var(--skill-width);
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-section {
    min-height: 100vh;
}

.contact-content {
    max-width: 900px;
    margin: 0 auto;
}

.contact-text h3 {
    font-size: 2rem;
    color: var(--primary-cyan);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.contact-text p {
    color: var(--gray-text);
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.contact-info {
    margin-bottom: 3rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.info-item:hover {
    border-color: var(--border-hover);
    transform: translateX(10px);
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.2);
}

.info-icon {
    color: var(--primary-cyan);
    flex-shrink: 0;
}

.contact-link {
    color: var(--light-text);
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

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

.social-platforms {
    margin-top: 3rem;
}

.social-platforms h4 {
    font-size: 1.5rem;
    color: var(--light-text);
    margin-bottom: 2rem;
    font-weight: 600;
}

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

.social-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.social-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.social-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--border-hover);
    box-shadow: 0 12px 40px rgba(0, 212, 255, 0.3);
}

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

.instagram-card:hover {
    box-shadow: 0 12px 40px rgba(214, 41, 118, 0.4);
}

.discord-card:hover {
    box-shadow: 0 12px 40px rgba(88, 101, 242, 0.4);
}

.social-icon-wrapper {
    flex-shrink: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-card:hover .social-icon-wrapper {
    transform: scale(1.15) rotate(5deg);
}

.social-icon {
    display: block;
}

.discord-icon {
    filter: drop-shadow(0 0 8px rgba(88, 101, 242, 0.6));
}

.social-card:hover .discord-icon {
    filter: drop-shadow(0 0 15px rgba(88, 101, 242, 0.9));
}

.social-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.social-name {
    color: var(--light-text);
    font-size: 1.3rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.social-card:hover .social-name {
    color: var(--primary-cyan);
}

.social-handle {
    color: var(--gray-text);
    font-size: 0.95rem;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    position: relative;
    z-index: 1;
    background: rgba(6, 8, 24, 0.8);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: auto;
}

.footer .container {
    text-align: center;
}

.footer p {
    color: var(--gray-text);
    font-size: 0.95rem;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .nav-menu {
        gap: 1.5rem;
        font-size: 0.9rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    .hero-card {
        padding: 2rem 2.5rem;
    }

    .greeting {
        font-size: 2rem;
    }

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

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

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

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

    section {
        padding: 5rem 1.5rem 3rem;
    }

    .skills {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 1rem;
    }

    .nav-menu {
        gap: 1rem;
    }

    .profile-image {
        width: 150px;
        height: 150px;
    }

    .hero-card {
        padding: 2rem 1.5rem;
    }

    .greeting {
        font-size: 1.8rem;
    }

    .tagline {
        font-size: 1.1rem;
    }
}

/* ============================================
   UTILITIES
   ============================================ */
a, button, .category-card, .project-card, .social-card {
    -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--primary-cyan);
    outline-offset: 4px;
}
