/* ==========================================
   DATA SCIENCE PORTFOLIO - COMPLETE STYLES
   Interactive Starfield Background
   ========================================== */

/* CSS VARIABLES */
:root {
    /* Dark Theme Colors */
    --color-bg-primary: #0a0e1a;
    --color-bg-secondary: #121827;
    --color-surface: #1e2638;
    
    /* Accent Colors - Cosmic Theme */
    --color-primary: #ef4444;
    --color-secondary: #f59e0b;
    --color-blue: #60a5fa;
    --color-purple: #a78bfa;
    
    /* Text */
    --color-text-primary: #ffffff;
    --color-text-secondary: #e2e8f0;
    --color-text-tertiary: #94a3b8;
    
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;
    
    /* Typography */
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ==========================================
   NAVIGATION
   ========================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 14, 26, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(96, 165, 250, 0.1);
    z-index: 100;
    transition: all 0.3s ease;
}

.header.scrolled {
    background: rgba(10, 14, 26, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

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

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-right: auto;
}

.nav-logo {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-identity {
    display: flex;
    flex-direction: column;
}

.nav-name {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

.nav-tagline {
    font-size: 0.875rem;
    color: var(--color-text-tertiary);
}

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

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    transition: width 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--color-primary);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* Mobile Menu */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-text-primary);
    transition: all 0.3s ease;
}

/* ==========================================
   HERO SECTION
   ========================================== */

.hero {
    position: relative;
    min-height: 110vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: 80px;
    padding-left: 80px;
}

#starfieldCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-container {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 3rem;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
    min-height: calc(100vh - 160px);
}

.hero-text {
    animation: fadeInUp 0.8s ease-out;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: .5rem 1rem;
    background: rgba(96, 165, 250, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 9999px;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--color-blue);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(96, 165, 250, 0.7);
    }
    50% { 
        opacity: 0.8;
        box-shadow: 0 0 0 10px rgba(96, 165, 250, 0);
    }
}

/* Typography */
h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin-bottom: 1rem;
    line-height: 1.1;
}

.title-greeting {
    display: block;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    color: var(--color-text-secondary);
}

.title-line {
    display: block;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    color: var(--color-text-secondary);
}

.title-highlight {
    display: block;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    color: var(--color-text-tertiary);
    margin-bottom: 1.5rem;
}

.rotating-text {
    color: var(--color-secondary);
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
    max-width: 600px;
    background: rgba(30, 38, 56, 0.7);
    padding: 1.5rem;
    border-radius: 1rem;
    border-left: 4px solid var(--color-blue);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-description strong {
    color: var(--color-blue);
    font-weight: 700;
}

/* CTA Buttons */
.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    align-items: center;
    padding: 1.5rem;
    background: rgba(30,38,56,0.6);
    border-radius: 1rem;
    border: 1px solid rgba(96, 165 250 0.2);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0,2);
}

.btn {
    padding: 1rem 2.5rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    white-space: nowrap;
    min-width: 180px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: white;
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--color-blue);
    border: 2px solid var(--color-blue);
    padding: 0.875rem 2.25rem;
}

.btn-secondary:hover {
    background: rgba(96, 165, 250, 0.1);
    border-color: var(--color-blue);
    transform: translateY(-2px);
}

/* Tech Stack */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    padding: 0.5rem;
    background: rgba(30, 38, 56, 0.6);
    border-radius: 1rem;
    border: 1px solid rgba(96, 165, 250, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border-top: 1px solid rgba(96, 165, 250, 0.2);
}

.tech-badge {
    display: inline-flex;   /* 🔑 FIX */
    align-items: center;
    padding: 0.65rem 1.25rem;
    background: rgba(96, 165, 250, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 9999px;
    font-size: 0.95rem;
    color: var(--color-blue);
    transition: transform 0.3s ease, 
                box-shadow 0.3s ease, 
                background 0.3s ease, 
                border-color 0.3s ease, 
                color 0.3s ease;
    cursor: pointer;
    
}

.tech-badge:hover {
    background: rgba(96, 165, 250, 0.25);
    border-color: var(--color-blue);
    transform: translateY(-3px);
    box-shadow: 
        0 0 20px rgba(96, 165, 250, 0.6),
        0 0 40px rgba(96, 165, 250, 0.4),
        0 4px 15px rgba(0, 0, 0, 0.3);
    color: var(--color-text-primary);
}

/* ==========================================
   STATS CARD
   ========================================== */

.stats-card {
    background: rgba(30, 38, 56, 0.7);
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 1.5rem;
    padding: 2rem;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: fadeInRight 0.8s ease-out 0.2s both;
    width: 100%;
    max-width: 450px;
    justify-self: center;
    margin-bottom: 1rem;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.stats-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(96, 165, 250, 0.2);
}

.stats-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--color-blue) 0%, var(--color-purple) 100%);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stats-title {
    font-size: 1rem;
    color: var(--color-blue);
    font-weight: 600;
}

.stat-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(96, 165, 250, 0.1);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

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

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-blue) 0%, var(--color-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-bar {
    width: 100%;
    height: 4px;
    background: rgba(96, 165, 250, 0.1);
    border-radius: 9999px;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-blue) 0%, var(--color-purple) 100%);
    border-radius: 9999px;
    animation: fillAnimation 1.5s ease-out forwards;
    transform-origin: left;
}

@keyframes fillAnimation {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

/* ==========================================
   SCROLL INDICATOR
   ========================================== */

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-tertiary);
    font-size: 0.875rem;
    animation: fadeIn 1s ease-out 1s both;
    z-index: 2;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.scroll-line {
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, var(--color-blue), transparent);
    animation: scrollAnimation 2s ease-in-out infinite;
}

@keyframes scrollAnimation {
    0%, 100% {
        transform: scaleY(1);
        opacity: 1;
    }
    50% {
        transform: scaleY(0.5);
        opacity: 0.5;
    }
}

/* ==========================================
   CONTACT SECTION
   ========================================== */

.contact {
    padding: 6rem 2rem;
    background: var(--color-bg-secondary);
    position: relative;
}

.contact::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image: 
        repeating-linear-gradient(0deg, var(--color-blue) 0px, var(--color-blue) 1px, transparent 1px, transparent 40px),
        repeating-linear-gradient(90deg, var(--color-blue) 0px, var(--color-blue) 1px, transparent 1px, transparent 40px);
}

.contact-container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.contact-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-label {
    color: var(--color-blue);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    display: block;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

.contact-intro {
    font-size: 1.25rem;
    color: var(--color-text-tertiary);
}

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

.contact-form {
    background: rgba(30, 38, 56, 0.6);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 1.5rem;
    padding: 2rem;
    backdrop-filter: blur(20px);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-input {
    width: 100%;
    padding: 1rem;
    background: rgba(10, 14, 26, 0.5);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 0.75rem;
    color: var(--color-text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input::placeholder {
    color: var(--color-text-tertiary);
}

.form-input:focus {
    outline: none;
    border-color: var(--color-blue);
    background: rgba(10, 14, 26, 0.8);
}

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

.form-error {
    color: var(--color-primary);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

.form-group.error .form-error {
    display: block;
}

.form-group.error .form-input {
    border-color: var(--color-primary);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-method {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(30, 38, 56, 0.6);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 1rem;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
}

.contact-method:hover {
    transform: translateX(8px);
    border-color: var(--color-blue);
}

.method-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--color-blue) 0%, var(--color-purple) 100%);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.method-content h4 {
    color: var(--color-text-secondary);
    margin-bottom: 0.25rem;
}

.method-content a {
    color: var(--color-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

.method-content a:hover {
    color: var(--color-text-primary);
}

/* ==========================================
   FOOTER
   ========================================== */

.footer {
    background: var(--color-bg-primary);
    padding: 3rem 2rem 2rem;
    border-top: 1px solid rgba(96, 165, 250, 0.1);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

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

.social-links a {
    width: 60px;
    height: 60px;
    background: rgba(96, 165, 250, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-blue);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--color-blue);
    color: white;
    transform: translateY(-2px);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--color-text-tertiary);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(96, 165, 250, 0.1);
    color: var(--color-text-tertiary);
    font-size: 0.875rem;
}

/* ==========================================
   BACK TO TOP BUTTON
   ========================================== */

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 50;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.4);
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding: 0 2rem;
    }

    .stats-card {
        order: -1;
        justify-self: center;
        max-width: 600px;
    }

    .hero-text {
        max-width: 100%;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--color-surface);
        flex-direction: column;
        padding: 6rem 2rem;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
        transition: right 0.3s ease;
    }

    .nav-links.active {
        right: 0;
    }

    .hero-container {
        padding: 0 1.5rem;
    }

    .cta-buttons {
        flex-direction: column;
        width: 100%;
        
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}