/* =========================================
   CSS Variables & Global Reset
   ========================================= */
:root {
    /* Colors */
    --bg-main: #050505;
    --bg-secondary: #0a0a0a;
    --bg-card: #141414;
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --primary: #0051ff; /* Royal Blue */
    --primary-hover: #2563eb;
    --primary-glow: rgba(0, 81, 255, 0.4);
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease-out;
}

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

html {
    scroll-behavior: smooth;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

.flex-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-padding {
    padding: 100px 0;
}

.highlight {
    color: var(--primary);
}

.text-glow {
    text-shadow: 0 0 20px var(--primary-glow);
}

/* =========================================
   Buttons
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 28px;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-medium);
    border: none;
    outline: none;
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--primary-glow);
}

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

.btn-secondary:hover {
    border-color: var(--text-primary);
    transform: translateY(-3px);
}

/* =========================================
   Navbar
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 1000;
    transition: all var(--transition-medium);
}

.navbar.scrolled {
    padding: 15px 0;
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-secondary);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--primary);
    transition: width var(--transition-medium);
}

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

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

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
}

/* Base mobile nav (hidden by default) */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background-color: var(--bg-card);
    z-index: 1001;
    padding: 80px 40px;
    transition: right var(--transition-medium);
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
}

.mobile-nav.open {
    right: 0;
}

.close-menu {
    position: absolute;
    top: 25px;
    right: 25px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.8rem;
    cursor: pointer;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.mobile-link {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.mobile-link:hover {
    color: var(--primary);
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px; /* Offset for navbar */
}

.hero-bg-glow {
    position: absolute;
    top: 20%;
    left: 10%;
    width: 400px;
    height: 400px;
    background: var(--primary);
    filter: blur(150px);
    opacity: 0.15;
    border-radius: 50%;
    z-index: -1;
}

.hero-container {
    gap: 50px;
}

.hero-content {
    flex: 1;
}

.greeting {
    color: var(--primary);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.hero-title {
    font-size: 4.5rem;
    margin-bottom: 15px;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 25px;
}

.divider {
    color: var(--primary);
    margin: 0 10px;
}

.hero-tagline {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-cta {
    display: flex;
    gap: 20px;
}

.hero-image-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
}

.hero-image-border {
    position: relative;
    width: 400px;
    height: 400px;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    overflow: hidden;
    border: 4px solid rgba(0, 81, 255, 0.3);
    box-shadow: 0 0 30px var(--primary-glow);
    animation: morph 8s ease-in-out infinite;
}

@keyframes morph {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    50% { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; }
    100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.floating-badge {
    position: absolute;
    width: 60px;
    height: 60px;
    background: var(--bg-card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.05);
    animation: float 4s ease-in-out infinite;
}

.badge-1 {
    top: 50px;
    left: 20px;
    animation-delay: 0s;
}

.badge-2 {
    bottom: 50px;
    right: 20px;
    animation-delay: 2s;
}

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

/* =========================================
   Section Headers
   ========================================= */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.section-line {
    width: 80px;
    height: 4px;
    background: var(--primary);
    margin: 0 auto;
    border-radius: 2px;
    box-shadow: 0 0 10px var(--primary-glow);
}

/* =========================================
   About Section
   ========================================= */
.about {
    background-color: var(--bg-secondary);
    position: relative;
}

.about-container {
    max-width: 800px;
    margin: 0 auto;
}

.about-card {
    background: var(--bg-card);
    padding: 50px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    position: relative;
    overflow: hidden;
}

.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.quote-icon {
    font-size: 3rem;
    color: rgba(0, 81, 255, 0.1);
    position: absolute;
    top: 30px;
    left: 30px;
}

.about-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.about-text:last-child {
    margin-bottom: 0;
}

.about-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* =========================================
   Skills Section
   ========================================= */
.skills {
    position: relative;
}

.skills-bg-glow {
    position: absolute;
    top: 50%;
    right: 0;
    width: 500px;
    height: 500px;
    background: var(--primary);
    filter: blur(200px);
    opacity: 0.1;
    border-radius: 50%;
    z-index: -1;
    transform: translateY(-50%);
}

.skills-grid {
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.skill-card {
    background: var(--bg-card);
    padding: 40px 30px;
    border-radius: 15px;
    width:calc(33.333% - 20px);
    min-width: 280px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.03);
    transition: all var(--transition-medium);
}

.skill-card:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 81, 255, 0.3);
    box-shadow: 0 15px 30px rgba(0, 81, 255, 0.1);
}

.skill-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.skill-card h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.progress-container {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    width: 0; /* Animated via JS */
    box-shadow: 0 0 10px var(--primary-glow);
    transition: width 1.5s ease-out;
}

/* =========================================
   Projects Section
   ========================================= */
.projects {
    background-color: var(--bg-secondary);
}

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

.project-card {
    background: var(--bg-main);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all var(--transition-medium);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    border-color: rgba(0, 81, 255, 0.2);
}

.project-img-wrapper {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.project-card:hover .project-img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-medium);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-info {
    padding: 30px;
}

.project-info h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.project-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* =========================================
   Contact Section
   ========================================= */
.contact {
    position: relative;
}

.contact-bg-glow {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 600px;
    height: 600px;
    background: var(--primary);
    filter: blur(250px);
    opacity: 0.1;
    border-radius: 50%;
    z-index: -1;
}

.contact-wrapper {
    display: flex;
    gap: 60px;
    background: var(--bg-card);
    padding: 50px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.02);
}

.contact-info {
    flex: 1;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.contact-info > p {
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.icon-box {
    width: 50px;
    height: 50px;
    background: rgba(0, 81, 255, 0.1);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all var(--transition-fast);
}

.contact-item:hover .icon-box {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 15px var(--primary-glow);
}

.contact-item h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.contact-item p, .contact-item a {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.contact-item a:hover {
    color: var(--primary);
}

.contact-form-container {
    flex: 1.2;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-group {
    position: relative;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    background: var(--bg-main);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 15px 20px;
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all var(--transition-medium);
}

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

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 10px rgba(0, 81, 255, 0.2);
}

.contact-form label {
    position: absolute;
    left: 20px;
    top: 15px;
    color: var(--text-secondary);
    pointer-events: none;
    transition: all var(--transition-medium);
    background: var(--bg-main);
    padding: 0 5px;
}

.contact-form input:focus ~ label,
.contact-form input:not(:placeholder-shown) ~ label,
.contact-form textarea:focus ~ label,
.contact-form textarea:not(:placeholder-shown) ~ label {
    top: -10px;
    font-size: 0.85rem;
    color: var(--primary);
}

.btn-submit {
    align-self: flex-start;
    padding: 15px 35px;
}

/* =========================================
   Footer
   ========================================= */
footer {
    background: var(--bg-secondary);
    padding: 60px 0 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.footer-brand h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.footer-brand span {
    color: var(--primary);
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.footer-socials {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    border: 1px solid rgba(255,255,255,0.05);
    transition: all var(--transition-medium);
    font-size: 1.1rem;
}

.social-link:hover {
    background: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--primary-glow);
    border-color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* =========================================
   Animations Classes added by JS
   ========================================= */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.appear {
    opacity: 1;
    transform: translate(0);
}

/* =========================================
   Responsive Media Queries
   ========================================= */
@media (max-width: 992px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
        padding-top: 40px;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .hero-image-border {
        width: 320px;
        height: 320px;
    }
    
    .contact-wrapper {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.4rem;
    }
    
    .about-card {
        padding: 30px;
    }
    
    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .hero-image-border {
        width: 260px;
        height: 260px;
    }
    
    .hero-title {
        font-size: 2.4rem;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .floating-badge {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
}
