/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #111827 0%, #1f2937 50%, #111827 100%);
    color: white;
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    text-align: center;
    max-width: 400px;
    width: 100%;
    padding: 0 2rem;
}

/* FIX: Changed h1 selector to .loading-title */
.loading-title {
    font-size: 4rem;
    font-weight: bold;
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

.loading-subtitle {
    color: #9ca3af;
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.loading-bar-container {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.loading-bar {
    width: 100%;
    height: 4px;
    background: #374151;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    border-radius: 2px;
    transition: width 0.1s ease;
}

.loading-percentage {
    color: #60a5fa;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    animation: pulse 1s infinite;
}

/* Floating Elements */
.floating-elements {
    /* FIX: Changed from fixed to absolute for true parallax effect */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.floating-dot {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    animation: float 12s infinite ease-in-out;
}

.floating-dot:nth-child(2) {
    animation-delay: 4s;
    animation-duration: 15s;
}

.floating-dot:nth-child(3) {
    animation-delay: 8s;
    animation-duration: 18s;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(75, 85, 99, 0.5);
    z-index: 1000;
    transition: all 0.3s ease;
}

/* FIX: Added class for scrolled state for cleaner JS */
.navbar.scrolled {
    background: rgba(17, 24, 39, 0.95);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

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

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: transform 0.3s ease;
}

.nav-brand:hover {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: #d1d5db;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    /* FIX: Added for ripple effect containment */
    position: relative;
    overflow: hidden;
}

.nav-link:hover {
    color: white;
    background: rgba(55, 65, 81, 0.5);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.nav-link i {
    font-size: 0.8rem;
}

/* FIX: Added styles for the mobile navigation toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #d1d5db;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
    padding: 0.5rem;
}

/* Main Content */
.main-content {
    position: relative;
    z-index: 10;
}

/* Hero Section */
.hero-section {
    padding: 8rem 2rem 4rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-content {
    text-align: center;
    margin-bottom: 4rem;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: bold;
    background: linear-gradient(135deg, #ffffff, #bfdbfe, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    animation: gradient-shift 5s infinite;
    background-size: 200% 200%;
    transition: transform 0.3s ease;
}

.hero-title:hover {
    transform: scale(1.02);
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.25rem);
    color: #d1d5db;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.badge {
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 9999px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.badge:hover {
    background: rgba(59, 130, 246, 0.3);
    transform: scale(1.1) rotate(2deg);
}

/* About Cards */
.about-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* Sections */
.section {
    padding: 4rem 2rem;
    position: relative;
}

.section.alt-bg {
    background: rgba(55, 65, 81, 0.3);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: bold;
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.section-title:hover {
    transform: scale(1.05);
}

.section-subtitle {
    color: #d1d5db;
    max-width: 600px;
    margin: 0 auto;
}

/* Cards */
.card {
    background: rgba(55, 65, 81, 0.5);
    border: 1px solid #4b5563;
    border-radius: 1rem;
    padding: 1.5rem;
    backdrop-filter: blur(8px);
    /* FIX: Split transitions for better control and removed 'all' */
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, opacity 0.5s ease;
    opacity: 0;
    transform: translateY(20px);
}

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

/* FIX: Made hover effect more pronounced and stable, removed JS dependency */
.card:hover {
    background: rgba(55, 65, 81, 0.7);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.1);
    transform: translateY(-8px) scale(1.02);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.card-icon {
    color: #60a5fa;
    font-size: 1.25rem;
}

.card-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

.card-text {
    color: #d1d5db;
    font-size: 0.875rem;
    line-height: 1.6;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    color: #9ca3af;
    font-size: 0.75rem;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #60a5fa;
    margin-bottom: 1rem;
}

/* Location Info */
.location-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* FIX: New styling for cleaner alignment */
.location-item {
    display: flex;
    align-items: center;
    justify-content: space-between; /* This aligns the status badge to the right */
    color: #d1d5db;
    font-size: 0.875rem;
}

.location-item-label {
    display: flex;
    align-items: center;
    gap: 0.75rem; /* Increased gap for better spacing */
}

.location-item i {
    color: #60a5fa;
    width: 16px;
    text-align: center;
}

.location-item .location-item-label .fa-coffee {
    color: #10b981;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-badge {
    padding: 0.25rem 0.75rem;
    border: 1px solid #4b5563;
    color: #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.skill-badge:hover {
    border-color: #3b82f6;
    color: #93c5fd;
    transform: scale(1.1) rotate(2deg);
}

.specialties-list {
    list-style: none;
    color: #d1d5db;
    font-size: 0.875rem;
}

.specialties-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.specialties-list i {
    color: #60a5fa;
    font-size: 0.75rem;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: rgba(55, 65, 81, 0.5);
    border: 1px solid #4b5563;
    border-radius: 1rem;
    padding: 1rem;
    backdrop-filter: blur(8px);
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, opacity 0.5s ease;
    opacity: 0;
    transform: translateY(20px);
}

.project-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.project-card:hover {
    background: rgba(55, 65, 81, 0.7);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.1);
    transform: translateY(-8px) scale(1.02);
}

.project-image {
    aspect-ratio: 16/9;
    background: #374151;
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.project-image.square {
    aspect-ratio: 1/1;
}

.project-image:hover {
    transform: scale(1.05);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.project-card:hover .project-title {
    color: #60a5fa;
}

.project-description {
    color: #9ca3af;
    font-size: 0.75rem;
    /* FIX: Ensure a minimum height to prevent cards from changing size */
    min-height: 40px; 
    margin-bottom: 0.5rem;
}

.software-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 0.5rem;
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

.software-badge:hover {
    background: rgba(59, 130, 246, 0.3);
    transform: scale(1.05);
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.contact-card {
    text-align: center;
}

.discord-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
}

.discord-label {
    color: #d1d5db;
}

.discord-username {
    color: #60a5fa;
    font-family: 'Courier New', monospace;
    font-size: 1.125rem;
}

.copy-btn {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    /* FIX: Added for ripple effect containment */
    position: relative;
    overflow: hidden;
}

.copy-btn:hover {
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.2);
    transform: scale(1.1);
}

.copy-btn.copied {
    color: #10b981;
    animation: bounce 0.5s ease;
}

.contact-note {
    color: #9ca3af;
    font-size: 0.875rem;
}

.pricing-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(147, 197, 253, 0.1));
    border-color: rgba(59, 130, 246, 0.3);
}

/* Footer */
.footer {
    padding: 2rem;
    border-top: 1px solid #4b5563;
    text-align: center;
}

.footer p {
    color: #9ca3af;
    font-size: 0.875rem;
    animation: pulse 2s infinite;
}

/* Animations */
@keyframes float {
    0%, 100% { 
        transform: translateY(0px) translateX(0px); 
        opacity: 0.1;
    }
    50% { 
        transform: translateY(-20px) translateX(10px); 
        opacity: 0.3;
    }
}

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

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Responsive Design */
@media (max-width: 768px) {
    /* FIX: Show toggle button on mobile */
    .nav-toggle {
        display: block;
    }
    /* FIX: Style the nav menu for mobile view */
    .nav-menu {
        display: none; /* Hidden by default */
        position: absolute;
        top: 100%; /* Position it right below the navbar */
        left: 0;
        right: 0;
        width: 100%;
        background: rgba(31, 41, 55, 0.98);
        flex-direction: column;
        align-items: center;
        padding: 1rem 0;
        border-top: 1px solid #4b5563;
    }
    /* This class will be toggled by JS */
    .nav-menu.active {
        display: flex;
    }
    
    .hero-section {
        padding: 6rem 1rem 2rem;
    }
    
    .section {
        padding: 3rem 1rem;
    }
    
    .about-cards,
    .skills-grid,
    .projects-grid,
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .discord-info {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #111827;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #3b82f6, #60a5fa);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #2563eb, #3b82f6);
}

/* Selection */
::selection {
    background: rgba(59, 130, 246, 0.3);
    color: white;
}