/* --- CSS Variables --- */
:root {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --secondary: #8b5cf6;
    --glass-bg: rgba(30, 41, 59, 0.4);
    --glass-border: rgba(255, 255, 255, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Base & Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-family: 'Outfit', sans-serif;
}

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

/* --- Animated Background --- */
.bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}
.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
    animation: float 20s infinite alternate;
}
.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -10%;
    left: -10%;
}
.shape-2 {
    width: 500px;
    height: 500px;
    background: var(--secondary);
    bottom: -20%;
    right: -10%;
    animation-delay: -5s;
}
.shape-3 {
    width: 300px;
    height: 300px;
    background: #10b981;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

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

/* --- Glassmorphism Utilities --- */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* --- Typography --- */
h1, h2, h3 {
    font-weight: 700;
    line-height: 1.2;
}
.highlight {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.section-title {
    text-align: center;
    margin-bottom: 2rem;
}
.section-title h2 {
    font-size: 2.5rem;
}
.section-padding {
    padding: 3.5rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.6);
}
.btn-secondary {
    background: transparent;
    color: var(--text-color);
    border: 2px solid var(--glass-border);
    backdrop-filter: blur(5px);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    z-index: 1000;
    transition: var(--transition);
}
.navbar.scrolled {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(15px);
    padding: 1rem 5%;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}
.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}
.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}
.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}
.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}
.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding-top: 8rem;
}
.hero-content {
    flex: 1;
}
.greeting {
    font-size: 1.2rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 0.5rem;
}
.typing-text {
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    min-height: 40px;
}
.hero-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 500px;
}
.hero-cta {
    display: flex;
    gap: 1rem;
}
.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}
.hero-image img {
    width: 400px;
    height: 400px;
    object-fit: cover;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: morph 8s ease-in-out infinite;
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
    border: 4px solid var(--glass-border);
}

@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%; }
}

/* --- About Section --- */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
.about-text, .skills-container {
    padding: 2.5rem;
}
.about-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}
.stats {
    display: flex;
    justify-content: space-between;
}
.stat-item h3 {
    font-size: 2rem;
    color: var(--primary);
}
.stat-item p {
    color: var(--text-muted);
    font-size: 0.9rem;
}
.skills-container h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.skill-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}
.skill-badge:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

/* --- Services Section --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}
.service-card {
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
}
.service-card:hover {
    transform: translateY(-10px);
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary);
}
.service-card .icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}
.service-card h3 {
    margin-bottom: 1rem;
}
.service-card p {
    color: var(--text-muted);
}

/* --- Portfolio Section --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.portfolio-card {
    overflow: hidden;
    position: relative;
    border-radius: 20px;
    padding: 0; /* Remove default glass padding for image */
}
.portfolio-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}
.portfolio-card:hover img {
    transform: scale(1.1);
}
.portfolio-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem 1.5rem;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95), transparent);
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
}
.portfolio-card:hover .portfolio-info {
    transform: translateY(0);
    opacity: 1;
}
.portfolio-info h3 {
    margin-bottom: 0.5rem;
}
.portfolio-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}
.view-btn {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}
.view-btn:hover {
    text-decoration: underline;
}

/* --- Contact Section --- */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    padding: 3rem;
}
.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}
.contact-info p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}
.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}
.contact-item i {
    color: var(--primary);
}
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}
.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid var(--glass-border);
}
.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: white;
    font-family: 'Outfit', sans-serif;
    transition: var(--transition);
}
.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
}

/* --- Scroll Animations --- */
.hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}
.show {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 10rem;
    }
    .hero-cta {
        justify-content: center;
    }
    .about-container {
        grid-template-columns: 1fr;
    }
    .contact-container {
        grid-template-columns: 1fr;
        padding: 2rem;
    }
    .hero-content h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(15px);
        flex-direction: column;
        text-align: center;
        padding: 2rem 0;
        box-shadow: 0 4px 30px rgba(0,0,0,0.5);
    }
    .nav-links.active {
        display: flex;
    }
    .hamburger {
        display: block;
    }
    .hero-image img {
        width: 300px;
        height: 300px;
    }
    .section-padding {
        padding: 4rem 1.5rem;
    }
}
