/* CSS Reset and Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --accent: #06b6d4;
    --dark: #0f172a;
    --darker: #020617;
    --gray: #64748b;
    --light-gray: #f8fafc;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--white);
    overflow-x: hidden;
}

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

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: var(--gradient);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero-text .highlight {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-text p {
    font-size: 1.25rem;
    color: var(--gray);
    margin-bottom: 2rem;
    max-width: 500px;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--dark);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--primary);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.2);
    background: var(--primary);
    color: white;
}

.hero-visual {
    position: relative;
    height: 400px;
}

/* Floating Animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.floating {
    animation: float 6s ease-in-out infinite;
}
/* General Section Styling */
.section {
    padding: 6rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.about-card:hover {
    transform: translateY(-10px);
}

.about-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

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

/* Skills Section */
.skills {
    background: var(--light-gray);
}

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

.skill-category {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-10px);
}

.skill-category h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--primary);
    font-weight: 600;
}

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

.skill-tag {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

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

.project-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
}

.project-header {
    height: 200px;
    background: var(--gradient);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-icon {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.project-content {
    padding: 2rem;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark);
}

.project-description {
    color: var(--gray);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    background: var(--light-gray);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.project-date {
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--light-gray);
}
/* Experience Section - Clean Card Design */
.experience {
    background: var(--light-gray);
}

.timeline {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Remove the central line */
.timeline::before {
    display: none;
}

.timeline-item {
    display: block;
    margin-bottom: 0;
    position: relative;
}

/* Remove the odd/even alternating layout */
.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-content {
    flex: none;
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin: 0;
    position: relative;
    border-left: 4px solid var(--primary);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-left-color: var(--secondary);
}

/* Remove the timeline dot */
.timeline-dot {
    display: none;
}

.timeline-date {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.timeline-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--dark);
    line-height: 1.3;
}

.timeline-company {
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timeline-company::before {
    content: '🏢';
    font-size: 1rem;
}

.timeline-details {
    list-style: none;
    padding: 0;
    margin: 0;
}

.timeline-details li {
    color: var(--gray);
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
    font-size: 1rem;
}

.timeline-details li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
    font-size: 1rem;
    top: 0;
}

.timeline-details li:last-child {
    margin-bottom: 0;
}

/* Add a subtle header badge */
.timeline-content::after {
    content: '';
    position: absolute;
    top: -2px;
    right: 2rem;
    width: 60px;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
}

/* Responsive Design for Experience */
@media (max-width: 768px) {
    .timeline {
        gap: 1.5rem;
        margin-top: 2rem;
    }
    
    .timeline-content {
        padding: 2rem;
        border-left-width: 3px;
    }
    
    .timeline-title {
        font-size: 1.2rem;
    }
    
    .timeline-company {
        font-size: 1rem;
    }
    
    .timeline-details li {
        font-size: 0.95rem;
        padding-left: 1.25rem;
    }
    
    .timeline-content::after {
        right: 1.5rem;
        width: 50px;
    }
}

@media (max-width: 480px) {
    .timeline-content {
        padding: 1.5rem;
        border-left-width: 3px;
    }
    
    .timeline-title {
        font-size: 1.1rem;
    }
    
    .timeline-company {
        font-size: 0.95rem;
    }
    
    .timeline-details li {
        font-size: 0.9rem;
        padding-left: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .timeline-date {
        font-size: 0.85rem;
    }
    
    .timeline-content::after {
        right: 1rem;
        width: 40px;
        height: 3px;
    }
}

/* Contact Section */
.contact {
    background: var(--dark);
    color: white;
}

.contact .section-title {
    color: white;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.contact-details strong {
    display: block;
    color: white;
    margin-bottom: 0.25rem;
}

.contact-details p {
    color: var(--gray);
    margin: 0;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: white;
}

.form-group input,
.form-group textarea {
    padding: 1rem;
    border: 2px solid var(--gray);
    border-radius: 12px;
    background: white;
    color: var(--dark);
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
footer {
    background: var(--darker);
    color: white;
    text-align: center;
    padding: 2rem 0;
}

footer p {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .hero-content {
        gap: 2rem;
    }
    
    .hero-text h1 {
        font-size: clamp(2rem, 4vw, 3rem);
    }
    
    .about-content {
        gap: 2rem;
    }
    
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    /* Navigation */
    .nav-links {
        display: none;
    }
    
    nav {
        padding: 1rem;
    }
    
    .logo {
        font-size: 1.25rem;
    }
    
    /* Hero Section */
    .hero {
        padding-top: 4rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-text h1 {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
    }
    
    .hero-text p {
        font-size: 1.1rem;
        max-width: none;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
    
    /* About Section */
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    /* Skills */
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .skill-category {
        padding: 1.5rem;
    }
    
    /* Projects */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .project-card {
        margin: 0 1rem;
    }
    
    .project-header {
        height: 150px;
    }
    
    .project-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .project-content {
        padding: 1.5rem;
    }
    
    /* Timeline */
    .timeline::before {
        left: 2rem;
    }
    
    .timeline-item {
        flex-direction: column;
    }
    
    .timeline-item:nth-child(odd) {
        flex-direction: column;
    }
    
    .timeline-content {
        margin-left: 4rem;
        margin-right: 1rem;
    }
    
    .timeline-dot {
        left: 2rem;
    }
    
    /* Contact */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    /* Sections */
    .section {
        padding: 4rem 0;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero-text h1 {
        font-size: 1.8rem;
        line-height: 1.2;
    }
    
    .hero-text p {
        font-size: 1rem;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .about-card,
    .skill-category,
    .project-content {
        padding: 1rem;
    }
    
    .timeline-content {
        margin-left: 3rem;
        margin-right: 0.5rem;
        padding: 1.5rem;
    }
    
    .timeline::before {
        left: 1.5rem;
    }
    
    .timeline-dot {
        left: 1.5rem;
        width: 16px;
        height: 16px;
    }
    
    .social-links a {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Color */
::selection {
    background: var(--primary);
    color: white;
}

::-moz-selection {
    background: var(--primary);
    color: white;
}

/* Scrollbar Styling (Webkit browsers) */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Loading Animation for Images */
img {
    transition: opacity 0.3s ease;
}

/* Focus Styles for Accessibility */
*:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .hero-bg,
    .floating,
    .btn,
    .social-links {
        display: none;
    }
    
    .hero {
        min-height: 0;
        padding: 2rem 0;
    }
    
    .section {
        padding: 2rem 0;
        break-inside: avoid;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --gray: #333333;
        --light-gray: #f0f0f0;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .floating {
        animation: none;
    }
}

/* Three.js Fallback and Enhancement */
.hero-bg {
    background: radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(236, 72, 153, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 40% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
    animation: backgroundPulse 20s ease-in-out infinite;
}

@keyframes backgroundPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Loading indicator for Three.js */
.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(99, 102, 241, 0.3);
    border-top: 3px solid #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1;
}

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

/* Hide loading indicator once Three.js loads */
.three-loaded .hero::before {
    display: none;
}

.hero::before { display: none !important; }