:root {
    --bg-color: #f5f7fa;
    --text-color: #333;
    --card-bg: #fff;
    --accent: #64ffda;
}

body.dark {
    --bg-color: #0a192f;
    --text-color: #e0e0e0;
    --card-bg: #112240;
    --accent: #64ffda;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: var(--text-color);
    transition: background 0.3s, color 0.3s;

    background-image: url(background2.jpg);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
}

header {
    text-align: center;
    padding: 2rem;
    animation: fadeIn 1.5s ease;
}

header h1 {
    font-size: 2.5rem;
    margin: 0;
}

header p {
    font-size: 1.2rem;
}

nav {
    text-align: center;
    padding: 1rem;
    background: var(--card-bg);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

nav a {
    margin: 0 15px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: bold;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--accent);
}

section {
    padding: 2rem;
    max-width: 1000px;
    margin: auto;
    animation: fadeInUp 1s ease;
}

h2 {
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
    display: inline-block;
    margin-bottom: 1rem;
}

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

.card {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, background 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

footer {
    text-align: center;
    padding: 1rem;
    background: var(--card-bg);
    margin-top: 2rem;
}

footer a {
    color: var(--accent);
    margin: 0 10px;
    text-decoration: none;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.toggle-btn {
    position: fixed;
    top: 15px;
    right: 20px;
    background: var(--accent);
    color: #000;
    border: none;
    padding: 10px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background: #0a192f;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
}

.logo span {
    color: #64ffda;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: #e0e0e0;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #64ffda;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #0a192f, #112240);
    color: #fff;
    padding: 100px 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-img img {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #64ffda;
    box-shadow: 0 0 20px rgba(100, 255, 218, 0.5);
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
}

.hero-text h1 {
    font-size: 2.5rem;
}

.hero-text h3 {
    font-size: 1.5rem;
}

.highlight {
    color: #64ffda;
}

.hero-buttons {
    margin-top: 20px;
}

.btn {
    padding: 10px 20px;
    margin: 5px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
}

.hire-btn {
    background: #64ffda;
    color: #000;
}

.contact-btn {
    background: transparent;
    border: 2px solid #64ffda;
    color: #64ffda;
}

.download-btn {
    background: #e91e63;
    color: #fff;
    padding: 10px 15px;
    border-radius: 5px;
}

/* 🎨 Main styles (default desktop look) */
/* ... your normal CSS ... */

/* Navbar styles */
/* Hero section styles */
/* Skills & Projects grid */
/* Footer styles */
/* etc. */

/* 📱 Responsive tweaks start here */

/* --- Medium screens (tablets, phones landscape) --- */
@media (max-width: 768px) {
    .navbar {
        flex-direction: row;
        /* keep horizontal */
        justify-content: space-between;
        align-items: center;
    }

    .nav-links {
        flex-direction: row;
        /* keep links side by side */
        gap: 10px;
    }

    .hero-content {
        flex-direction: row;
        /* text + image side by side */
        flex-wrap: wrap;
        /* allows shrinking */
        text-align: left;
    }

    .hero-text {
        flex: 1;
        min-width: 200px;
    }

    .hero-img img {
        width: 150px;
        height: 150px;
    }
}

/* --- Small screens (phones portrait) --- */
@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 1.8rem;
    }

    .hero-text h3 {
        font-size: 1rem;
    }

    section {
        padding: 1rem;
    }

    .skills,
    .projects {
        grid-template-columns: 1fr;
        /* stack cards */
    }
}