/* ===========================
   Global Styles & Overrides
   =========================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.7;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Loading Screen */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.page-loader.fade-out {
    opacity: 0;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Fade-in Animation Classes */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Cursor Trail */
.cursor-particle {
    position: fixed;
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.7;
    animation: fadeOut 1s forwards;
    z-index: 9998;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: scale(0);
    }
}

/* Override Bootstrap container */
.container {
    max-width: 1200px;
}

/* ===========================
   Hero Section
   =========================== */

.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 100px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="1" fill="white" fill-opacity="0.1"/></svg>');
    opacity: 0.3;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.profile-container {
    position: relative;
    z-index: 1;
}

.profile-image-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 30px;
}

.profile-image {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 60px rgba(255, 255, 255, 0.4), 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.profile-image:hover {
    box-shadow: 0 0 80px rgba(255, 255, 255, 0.6), 0 8px 40px rgba(0, 0, 0, 0.4);
    transform: scale(1.05);
}

.profile-ring {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.profile-name {
    font-family: 'Poppins', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.profile-title {
    font-size: 1.4rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 20px;
}

.profile-details {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
}

.detail-item i {
    margin-right: 8px;
    opacity: 0.8;
}

.detail-separator {
    opacity: 0.5;
}

/* ===========================
   Section Styles
   =========================== */

section {
    padding: 80px 0;
}

.section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    color: var(--text-dark);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.section-content {
    max-width: 800px;
    margin: 0 auto;
}

/* ===========================
   About Section
   =========================== */

.about-section {
    background: var(--bg-white);
}

.about-text {
    font-size: 1.125rem;
    color: var(--text-light);
    text-align: center;
    line-height: 1.9;
}

/* ===========================
   Tech Stack Section
   =========================== */

.tech-section {
    background: var(--bg-light);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.tech-card {
    background: var(--bg-white);
    padding: 40px 20px;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.tech-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s;
}

.tech-card:hover::before {
    left: 100%;
}

.tech-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.2);
    border-color: var(--primary-color);
}

.tech-icon {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
}

.tech-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* ===========================
   Projects Section - Compact Animated Cards
   =========================== */

.projects-section {
    background: var(--bg-white);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    max-width: 1400px;
    margin: 0 auto;
}

.project-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    cursor: pointer;
}

.project-card:hover {
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.25);
    border-color: var(--primary-color);
}

.project-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.95), rgba(139, 92, 246, 0.95));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-links {
    display: flex;
    gap: 12px;
}

.project-link-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: white;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.project-link-btn:hover {
    background: var(--text-dark);
    color: white;
}

.project-content {
    padding: 20px;
    position: relative;
    z-index: 2;
}

.project-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-description {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 15px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tech-badge {
    padding: 5px 12px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    color: var(--primary-color);
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.tech-badge:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

/* ===========================
   Contact Section
   =========================== */

.contact-section {
    background: var(--bg-light);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.contact-card {
    background: var(--bg-white);
    padding: 40px 30px;
    border-radius: var(--border-radius);
    text-align: center;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.contact-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);
    transition: transform 0.3s;
}

.contact-card:hover::before {
    transform: scaleX(1);
}

.contact-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.2);
    border-color: var(--primary-color);
}

.contact-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
}

.contact-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.contact-card p {
    color: var(--text-light);
    margin: 0;
}

/* ===========================
   Footer
   =========================== */

.footer {
    background: var(--text-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 40px 0;
    text-align: center;
}

.footer p {
    margin: 8px 0;
    font-size: 0.95rem;
}

.admin-link a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.admin-link a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* ===========================
   Responsive Design
   =========================== */

@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .profile-name {
        font-size: 2.2rem;
    }

    .profile-title {
        font-size: 1.1rem;
    }

    .profile-details {
        flex-direction: column;
        gap: 10px;
    }

    .detail-separator {
        display: none;
    }

    .section-title {
        font-size: 2rem;
    }

    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .profile-image-wrapper {
        width: 140px;
        height: 140px;
    }

    .profile-image {
        width: 140px;
        height: 140px;
    }

    .profile-name {
        font-size: 1.8rem;
    }

    section {
        padding: 60px 0;
    }
} 