/* --- Variables & Reset --- */
:root {
    --bg-dark: #0f172a;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --accent-color: #2dd4bf; 
    --accent-glow: #0d9488;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    scroll-behavior: smooth; /* Global Smooth Scroll */
    overflow-x: hidden;      /* Fix for horizontal scroll issues */
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;      /* Double insurance for scroll issues */
    width: 100%;
    min-height: 100vh;
    font-size: 16px;
    position: relative;
}

/* --- Ambient Background --- */
.background-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    z-index: -1;
    animation: float 10s infinite alternate;
}

.shape-1 {
    width: 200px;
    height: 200px;
    background: var(--accent-glow);
    top: 5%;
    left: -10%;
    opacity: 0.4;
}

.shape-2 {
    width: 250px;
    height: 250px;
    background: #3b82f6;
    bottom: 5%;
    right: -10%;
    opacity: 0.3;
}

@keyframes float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(10px, 20px); }
}

/* --- Glassmorphism Utility --- */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* --- Navigation (Mobile Default) --- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem;
    border-radius: 0 0 16px 16px;
    transition: all 0.3s ease;
}

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

.logo { font-size: 1.5rem; font-weight: bold; }
.dot { color: var(--accent-color); }

/* Hamburger Icon */
.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001;
}

.bar {
    height: 3px;
    width: 100%;
    background-color: var(--accent-color);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

/* Hamburger to X Animation */
.menu-toggle.is-active .bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
.menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.nav-links {
    list-style: none;
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
    text-align: center;
}

.nav-links.active { display: flex; }

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-size: 1.1rem;
    display: block;
    padding: 0.5rem;
    transition: color 0.3s;
}

/* --- General Layout --- */
section {
    padding: 80px 1.5rem;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    scroll-margin-top: 100px; /* Prevents title from hiding behind nav */
}

h1 { font-size: 2.2rem; margin-bottom: 0.5rem; line-height: 1.2; }
h2 { font-size: 2rem; margin-bottom: 1.5rem; text-align: center; }
h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }

.accent { color: var(--accent-color); }
.subtitle { color: var(--text-muted); margin-bottom: 2rem; }

.card { padding: 2rem; width: 100%; transition: transform 0.3s ease; }

/* --- Hero Section --- */
.hero-card { text-align: center; }

.hero-logo {
    width: 80px;
    height: auto;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 10px rgba(45, 212, 191, 0.3));
    animation: logoFloat 6s ease-in-out infinite;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    text-decoration: none;
    border-radius: 8px;
    margin-top: 1.5rem;
    width: 100%;
    text-align: center;
    transition: all 0.3s ease;
    background: transparent;
    cursor: pointer;
}

.btn:hover {
    background: var(--accent-color);
    color: var(--bg-dark);
    box-shadow: 0 0 15px var(--accent-glow);
}

.socials {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}
.icon { font-size: 1.5rem; color: var(--text-main); transition: transform 0.3s; }
.icon:hover { color: var(--accent-color); transform: translateY(-3px); }

/* --- About Section (Mobile) --- */
.about-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
    text-align: center;
}

.profile-img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--accent-color);
    box-shadow: 0 0 25px rgba(45, 212, 191, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 35px rgba(45, 212, 191, 0.4);
}

/* --- Projects --- */
.project-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

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

.tags span {
    display: inline-block;
    font-size: 0.75rem;
    background: rgba(45, 212, 191, 0.1);
    color: var(--accent-color);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    margin-right: 0.3rem;
    margin-top: 0.8rem;
}

/* --- Contact Form --- */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
    width: 100%;
}

input, textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

input:focus, textarea:focus {
    border-color: var(--accent-color);
    background: rgba(45, 212, 191, 0.1);
}

footer { text-align: center; padding: 2rem; font-size: 0.8rem; color: var(--text-muted); }

/* =========================================
   DESKTOP STYLES (Min-width: 768px)
   ========================================= */
@media (min-width: 768px) {
    /* Larger Background Shapes */
    .shape-1 { width: 300px; height: 300px; filter: blur(80px); }
    .shape-2 { width: 400px; height: 400px; }

    /* Desktop Navigation */
    nav {
        width: 90%;
        left: 5%;
        top: 20px;
        padding: 1rem 2rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-radius: 16px;
    }

    .nav-content { width: auto; }
    .menu-toggle { display: none; } /* Hide hamburger */

    .nav-links {
        display: flex; 
        flex-direction: row;
        margin-top: 0;
        gap: 2rem;
    }

    .nav-links a { font-size: 1rem; padding: 0; }
    .nav-links a:hover { color: var(--accent-color); }

    /* Desktop Layout */
    section { padding: 100px 10%; min-height: 80vh; }
    
    h1 { font-size: 3.5rem; }
    h2 { font-size: 2.5rem; }

    .hero-card { padding: 4rem; max-width: 700px; margin: 0 auto; }
    .hero-logo { width: 120px; margin-bottom: 2rem; }
    
    /* Side-by-side About Section */
    .about-content {
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 4rem;
    }
    
    .profile-img { width: 220px; height: 220px; }
    .about-text h2 { text-align: left; margin-bottom: 1rem; }

    .contact-card { max-width: 600px; margin: 0 auto; padding: 3rem; }

    .btn, .submit-btn { width: auto; }
    .submit-btn { align-self: center; padding: 0.8rem 3rem; }

    .project-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
    }
}