/* --- CSS Reset & Variables --- */
:root {
    --bg-color: #0b0f19;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.5);
    --gradient-1: linear-gradient(135deg, #3b82f6, #8b5cf6);
    --gradient-2: linear-gradient(135deg, #ec4899, #8b5cf6);
    --gradient-3: linear-gradient(135deg, #10b981, #3b82f6);
    --glass-bg: rgba(17, 24, 39, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    --font-main: 'Outfit', sans-serif;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    
    /* Dynamic Animated Background */
    background: linear-gradient(-45deg, #020617, #1e3a8a, #4c1d95, #be185d, #0f172a);
    background-size: 400% 400%;
    animation: dynamicGradient 15s ease infinite;
    
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

@keyframes dynamicGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* --- Typography --- */
h1, h2, h3 {
    line-height: 1.2;
    font-weight: 600;
}

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

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

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

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

.section-padding {
    padding: 6rem 0;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

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

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

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

.btn-secondary:hover {
    background: var(--accent-color);
    color: white;
}

.btn-large {
    padding: 1rem 3rem;
    font-size: 1.1rem;
}

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

nav.scrolled {
    padding: 1rem 0;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -1px;
}

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

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

.nav-links a {
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
}

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

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

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

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 6rem;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-wrap: wrap-reverse;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    position: relative;
    z-index: 10;
    width: 100%;
}

.hero-text-content {
    flex: 1 1 500px;
    text-align: left;
}

.hero h1 {
    font-size: clamp(3rem, 7vw, 5rem);
    margin-bottom: 1rem;
    font-weight: 800;
}

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

.cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: flex-start;
}

/* --- Added for Profile, CV, and GitHub Links --- */
.hero-image-content {
    flex: 1 1 300px;
    display: flex;
    justify-content: center;
}

.profile-img-container {
    width: clamp(250px, 40vw, 400px);
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    padding: 6px;
    background: var(--gradient-1);
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    position: relative;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 6px solid var(--bg-color);
    background-color: var(--glass-bg);
}

.hero-socials {
    margin-top: 2.5rem;
    display: flex;
    justify-content: flex-start;
    gap: 2rem;
}

.hero-socials a {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
}

.hero-socials a:hover {
    color: var(--accent-color);
}

@media (max-width: 900px) {
    .hero-container {
        flex-direction: column-reverse;
        text-align: center;
    }
    .hero-text-content {
        text-align: center;
    }
    .cta-group, .hero-socials {
        justify-content: center;
    }
}

/* Background Blobs */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 10s infinite ease-in-out alternate;
}

.blob-1 {
    top: 10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: var(--accent-color);
}

.blob-2 {
    bottom: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: #8b5cf6;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

/* --- About Section --- */
.about-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

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

.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 3rem;
}

.skill-box {
    padding: 1rem 2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    cursor: default;
}

.skill-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.skill-box:hover {
    transform: translateY(-6px) scale(1.05);
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--accent-color);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
    color: #fff;
}

.skill-box:hover::before {
    left: 100%;
}

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

.project-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    transform-style: preserve-3d;
    will-change: transform;
}

.project-card:hover {
    box-shadow: 0 30px 50px rgba(0,0,0,0.5);
    border-color: rgba(255,255,255,0.3);
    z-index: 10;
}

.project-image {
    width: 100%;
    height: 200px;
}

.bg-gradient-1 { background: var(--gradient-1); }
.bg-gradient-2 { background: var(--gradient-2); }
.bg-gradient-3 { background: var(--gradient-3); }

.project-info {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
}

.project-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.project-link {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.project-link:hover {
    gap: 10px;
    color: #fff;
}

/* --- Contact Section --- */
.contact-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 4rem 2rem;
}

.contact-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
}

/* --- Footer --- */
footer {
    border-top: 1px solid var(--glass-border);
    padding: 2rem 0;
    margin-top: 2rem;
}

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

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

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

.social-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: var(--transition);
}

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

/* --- Animations & Utilities --- */
.animate-text {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards;
}

.animate-text.delay-1 { animation-delay: 0.2s; }
.animate-text.delay-2 { animation-delay: 0.4s; }

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--glass-bg);
        backdrop-filter: blur(15px);
        padding: 2rem;
        border-bottom: 1px solid var(--glass-border);
        text-align: center;
    }
    
    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: flex;
    }

    .cta-group {
        flex-direction: column;
    }

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

/* --- Interactivity Features --- */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: var(--gradient-1);
    z-index: 9999;
    transition: width 0.1s ease;
}

.cursor {
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease, width 0.3s ease, height 0.3s ease;
}

/* Hide on smaller screens to avoid mobile interference */
@media (max-width: 768px) {
    .cursor, .cursor-follower {
        display: none !important;
    }
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease, width 0.3s ease, height 0.3s ease, background 0.3s ease;
}

.cursor-hover {
    width: 60px !important;
    height: 60px !important;
    background: rgba(59, 130, 246, 0.1);
    border-color: transparent;
}

.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1.2em;
    background-color: var(--accent-color);
    animation: blink 0.8s infinite;
    vertical-align: middle;
    margin-left: 2px;
}

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