/* --- CSS VARIABLES & RESET --- */
:root {
    --bg-color: #020617;
    --bg-gradient: linear-gradient(to bottom right, #020617, #170F2D);
    --card-bg: rgba(30, 41, 59, 0.4);
    --card-border: rgba(148, 163, 184, 0.1);
    --primary: #8b5cf6;
    --primary-glow: rgba(139, 92, 246, 0.5);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --font-main: 'Outfit', sans-serif;
    --transition: all 0.3s ease;
}

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

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

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

.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.9rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-12 { margin-top: 3rem; }
.ml-2 { margin-left: 0.5rem; }
.w-full { width: 100%; }
.center-btn { text-align: center; }

.bg-subtle { background: rgba(255, 255, 255, 0.02); }

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

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

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 4rem auto;
}

section { padding: 100px 0; }

/* --- ANIMATIONS --- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

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

/* --- NAVBAR --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 1000;
    transition: var(--transition);
}

nav.scrolled {
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(12px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--card-border);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
}

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

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

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
}

.menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
}

/* --- HERO SECTION --- */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding-top: 80px;
    padding-bottom: 0;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

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

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2.5rem auto;
}

.btn-cosmic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2.5rem;
    background: var(--primary);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 0 20px var(--primary-glow);
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-cosmic:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px var(--primary-glow);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    animation: float 2s infinite ease-in-out;
    color: var(--text-muted);
}

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

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.about-cards {
    display: grid;
    gap: 1.5rem;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    gap: 1rem;
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.icon-box {
    background: rgba(139, 92, 246, 0.1);
    padding: 0.8rem;
    border-radius: 50%;
    color: var(--primary);
    height: fit-content;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- SKILLS SECTION --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-item {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--card-border);
}

.skill-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

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

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

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

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
}

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

.project-img {
    height: 200px;
    width: 100%;
    background: #1e1b4b;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.project-content { padding: 1.5rem; }

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

.tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.8rem;
    background: rgba(255,255,255,0.05);
    border-radius: 20px;
    color: var(--primary);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

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

.project-links a {
    color: var(--text-muted);
    transition: var(--transition);
}

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

/* --- CONTACT SECTION --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

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

.contact-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}
.contact-link:hover { color: var(--primary); }

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

.social-links a {
    color: var(--text-muted);
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--primary);
    transform: translateY(-3px);
}

form input, form textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(2, 6, 23, 0.5);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: white;
    margin-bottom: 1.5rem;
    font-family: inherit;
    transition: var(--transition);
}

form input:focus, form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

/* --- FOOTER --- */
footer {
    border-top: 1px solid var(--card-border);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-muted);
    margin-top: 4rem;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .hero-content h1 { font-size: 2.5rem; }
    .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(2, 6, 23, 0.95);
        flex-direction: column;
        align-items: center;
        padding: 2rem;
        clip-path: circle(0% at 100% 0);
        transition: clip-path 0.5s ease-in-out;
    }
    
    .nav-links.active {
        clip-path: circle(140% at 100% 0);
    }
    
    .menu-btn { display: block; }
}