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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #e4e4e7;
    background: #0a0a0f;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
}

.bg-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23334155" stroke-width="0.5" opacity="0.3"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
}

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

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

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

.loader {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(52, 211, 153, 0.1);
    border-top: 3px solid #34d399;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #60a5fa, #34d399, #a78bfa);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 8s ease infinite;
}

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

.hero .subtitle {
    font-size: clamp(1.2rem, 3vw, 2rem);
    color: #94a3b8;
    margin-bottom: 2rem;
    font-weight: 300;
}

.hero .description {
    font-size: 1.1rem;
    color: #cbd5e1;
    max-width: 600px;
    margin: 0 auto 3rem;
    line-height: 1.8;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #60a5fa, #34d399);
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(96, 165, 250, 0.3);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(96, 165, 250, 0.4);
}

/* Navigation */
.nav-dots {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.nav-dot.active,
.nav-dot:hover {
    background: #34d399;
    transform: scale(1.2);
}

.nav-dot::after {
    content: attr(data-label);
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(30, 41, 59, 0.9);
    color: #e4e4e7;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    white-space: nowrap;
    border: 1px solid #334155;
}

.nav-dot:hover::after {
    opacity: 1;
}

/* Sections */
.section {
    padding: 80px 0;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: #f1f5f9;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(135deg, #60a5fa, #34d399);
    border-radius: 2px;
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.project-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 30px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    opacity: 0;
    transform: translateY(50px);
    height: 500px;
    display: flex;
    flex-direction: column;
}

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

.project-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: #60a5fa;
    box-shadow: 0 10px 30px rgba(96, 165, 250, 0.1);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #60a5fa, #34d399);
}

.project-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(96, 165, 250, 0.1);
    color: #60a5fa;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    border: 1px solid rgba(96, 165, 250, 0.2);
    margin-bottom: 15px;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #34d399;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.project-title {
    font-size: 1.5rem;
    color: #f1f5f9;
    margin-bottom: 15px;
    font-weight: 700;
}

.project-description {
    color: #94a3b8;
    margin-bottom: 25px;
    line-height: 1.7;
    font-size: 0.95rem;
    flex-grow: 1;
    overflow: hidden;
    display: -webkit-box;
    /* Standard property first for better compatibility */
    line-clamp: 4;
    /* Webkit fallback for older browsers */
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    margin-top: auto;
}

.tech-tag {
    background: rgba(52, 211, 153, 0.1);
    color: #34d399;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.project-links {
    display: flex;
    gap: 15px;
}

.project-link {
    color: #60a5fa;
    text-decoration: none;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.project-link:hover {
    color: #34d399;
}

/* Contact */
.contact-section {
    text-align: center;
    padding: 100px 0;
}

.contact-text {
    color: #94a3b8;
    font-size: 1.2rem;
    margin-bottom: 40px;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.contact-link {
    color: #60a5fa;
    text-decoration: none;
    font-size: 1rem;
    padding: 15px 25px;
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 8px;
    background: rgba(96, 165, 250, 0.05);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-link:hover {
    background: rgba(96, 165, 250, 0.1);
    border-color: #60a5fa;
    transform: translateY(-2px);
}

.contact-icon {
    font-size: 1.2rem;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #1e293b; }
::-webkit-scrollbar-thumb { background: #34d399; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #60a5fa; }

/* Responsive */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .nav-dots { display: none; }
    
    .project-card {
        height: auto;
        min-height: 400px;
    }
    
    .contact-links {
        flex-direction: column;
        gap: 20px;
    }
    
    .contact-link {
        font-size: 0.9rem;
        padding: 12px 20px;
    }
}