/* ==========================================================================
   CSS Variables & Theme
   ========================================================================== */

:root {
    /* Colors */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #16161f;
    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b0;
    --text-muted: #606070;
    
    /* Accent Colors */
    --accent-cyan: #00d4ff;
    --accent-purple: #a855f7;
    --accent-pink: #ec4899;
    --accent-green: #22c55e;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #00d4ff 0%, #a855f7 50%, #ec4899 100%);
    --gradient-secondary: linear-gradient(90deg, #00d4ff, #a855f7);
    
    /* Borders */
    --border-color: rgba(255, 255, 255, 0.08);
    
    /* Shadows */
    --glow-cyan: 0 0 30px rgba(0, 212, 255, 0.3);
    --glow-purple: 0 0 30px rgba(168, 85, 247, 0.3);
    
    /* Spacing */
    --section-padding: 6rem 4rem;
    --container-max-width: 1200px;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

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

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

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

/* ==========================================================================
   Background Effects
   ========================================================================== */

.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.bg-gradient::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(0, 212, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(168, 85, 247, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(236, 72, 153, 0.05) 0%, transparent 60%);
    animation: bgPulse 15s ease-in-out infinite;
}

@keyframes bgPulse {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(2%, 2%) scale(1.02); }
    66% { transform: translate(-2%, -2%) scale(0.98); }
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: -1;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: var(--section-padding);
    position: relative;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.5rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s ease;
}

nav.scrolled {
    background: rgba(10, 10, 15, 0.95);
}

.logo {
    font-family: 'Space Mono', monospace;
    font-size: 1.4rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
    text-decoration: none;
}

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

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

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

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

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

.nav-cta {
    padding: 0.7rem 1.5rem;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50px;
    color: var(--bg-primary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-cyan);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-btn svg {
    width: 28px;
    height: 28px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 4rem 4rem;
    position: relative;
}

.hero-content {
    max-width: 800px;
    animation: fadeInUp 1s ease-out;
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--accent-cyan);
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-badge .dot {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1); 
    }
    50% { 
        opacity: 0.5; 
        transform: scale(1.2); 
    }
}

.hero h1 {
    font-size: clamp(3rem, 7vw, 5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease-out 0.3s both;
}

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

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.5s both;
}

.hero-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.hero-link:hover {
    color: var(--accent-cyan);
}

.hero-link svg {
    width: 20px;
    height: 20px;
}

.hero-visual {
    position: absolute;
    right: 4rem;
    top: 50%;
    transform: translateY(-50%);
    width: 400px;
    height: 400px;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(-50%); }
    50% { transform: translateY(calc(-50% - 20px)); }
}

.hero-orb {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: 
        radial-gradient(circle at 30% 30%, rgba(0, 212, 255, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(168, 85, 247, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(236, 72, 153, 0.2) 0%, transparent 70%);
    filter: blur(60px);
    opacity: 0.6;
}

/* ==========================================================================
   Section Headers
   ========================================================================== */

.section-header {
    margin-bottom: 4rem;
}

.section-header--center {
    text-align: center;
}

.section-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
}

/* ==========================================================================
   About Section
   ========================================================================== */

.about {
    background: var(--bg-secondary);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

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

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.stat-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-cyan);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ==========================================================================
   Experience Section (Timeline)
   ========================================================================== */

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: var(--gradient-primary);
}

.timeline-item {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 3rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 8px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 3px solid var(--accent-cyan);
    box-shadow: var(--glow-cyan);
}

.timeline-date {
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    color: var(--accent-purple);
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.timeline-company {
    color: var(--accent-cyan);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.timeline-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    list-style: none;
}

.timeline-description li {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.timeline-description li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-cyan);
}

/* ==========================================================================
   Projects Section
   ========================================================================== */

.projects {
    background: var(--bg-secondary);
}

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

.project-card {
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-purple);
    box-shadow: var(--glow-purple);
}

.project-image {
    height: 200px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2) 0%, rgba(168, 85, 247, 0.2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 212, 255, 0.3) 0%, transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(168, 85, 247, 0.3) 0%, transparent 40%);
}

.project-icon {
    font-size: 4rem;
    z-index: 1;
}

.project-content {
    padding: 2rem;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.project-tag {
    padding: 0.3rem 0.8rem;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 50px;
    font-size: 0.75rem;
    color: var(--accent-cyan);
}

.project-tag--fellowship {
    background: rgba(168, 85, 247, 0.1);
    border-color: rgba(168, 85, 247, 0.3);
    color: var(--accent-purple);
}

.project-tag--personal {
    background: rgba(236, 72, 153, 0.1);
    border-color: rgba(236, 72, 153, 0.3);
    color: var(--accent-pink);
}

.project-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.project-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.project-highlights {
    list-style: none;
    margin-bottom: 1.5rem;
}

.project-highlights li {
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.project-highlights li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-green);
    font-weight: 700;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: transparent;
    border: 1px solid var(--accent-cyan);
    border-radius: 8px;
    color: var(--accent-cyan);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.project-link:hover {
    background: var(--accent-cyan);
    color: var(--bg-primary);
}

/* ==========================================================================
   Skills Section
   ========================================================================== */

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

.skill-category {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    transition: border-color 0.3s ease;
}

.skill-category:hover {
    border-color: var(--accent-cyan);
}

.skill-category-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.skill-category-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 10px;
    font-size: 1.2rem;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-item {
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.skill-item:hover {
    border-color: var(--accent-cyan);
    color: var(--text-primary);
    background: rgba(0, 212, 255, 0.1);
}

.skill-item--advanced {
    border-color: var(--accent-green);
    color: var(--accent-green);
}

.skill-item--intermediate {
    border-color: var(--accent-purple);
    color: var(--accent-purple);
}

/* ==========================================================================
   Education Section
   ========================================================================== */

.education {
    background: var(--bg-secondary);
}

.education-card {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.education-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.education-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.education-school {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.education-degree {
    color: var(--accent-cyan);
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.education-location {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.education-date {
    font-family: 'Space Mono', monospace;
    color: var(--accent-purple);
    font-size: 0.9rem;
    text-align: right;
}

.education-details {
    display: grid;
    gap: 1.5rem;
}

.education-item {
    display: flex;
    gap: 1rem;
}

.education-item-icon {
    width: 24px;
    height: 24px;
    color: var(--accent-cyan);
    flex-shrink: 0;
    margin-top: 2px;
}

.education-item-content h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.education-item-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ==========================================================================
   Contact Section
   ========================================================================== */

.contact {
    text-align: center;
}

.contact-subtitle {
    color: var(--text-secondary);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.contact-methods {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.contact-card {
    background: var(--bg-card);
    padding: 2rem 3rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    min-width: 200px;
}

.contact-card:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-5px);
    box-shadow: var(--glow-cyan);
}

.contact-card svg {
    width: 32px;
    height: 32px;
    margin-bottom: 1rem;
    color: var(--accent-cyan);
}

.contact-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.contact-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 50px;
    color: var(--accent-green);
    font-weight: 500;
}

.status-badge .pulse {
    width: 10px;
    height: 10px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
    padding: 3rem 4rem;
    border-top: 1px solid var(--border-color);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-cyan);
}

/* ==========================================================================
   Animations
   ========================================================================== */

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1024px) {
    .hero-visual {
        display: none;
    }

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

@media (max-width: 768px) {
    nav {
        padding: 1rem 1.5rem;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-cta {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    section {
        padding: 4rem 1.5rem;
    }

    .hero {
        padding: 6rem 1.5rem 4rem;
    }

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

    .contact-methods {
        flex-direction: column;
        align-items: center;
    }

    footer {
        padding: 2rem 1.5rem;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
    }

    .education-header {
        flex-direction: column;
        gap: 1rem;
    }

    .education-date {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-links {
        flex-direction: column;
        gap: 1rem;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .skills-container {
        grid-template-columns: 1fr;
    }

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

    .contact-card {
        width: 100%;
        padding: 1.5rem;
    }
}