:root {
    --light-bg: #f0f2f5;
    --dark-bg: #1e1e1e;
    --light-text: #333;
    --dark-text: #fff;
    --primary-color: #007BFF;
    --secondary-color: #6C757D;
    --accent-color: #28A745;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* General Styles */
body {
    margin: 0;
    font-family: var(--font-family);
    background: var(--light-bg);
    color: var(--light-text);
    transition: background 0.3s, color 0.3s;
}

body.dark-mode {
    background: var(--dark-bg);
    color: var(--dark-text);
}

/* Header Styles */
/* Header Styles */
header {
    background: var(--primary-color);
    color: #fff;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

header .logo {
    font-size: 1.5rem;
    font-weight: bold;
}

header .hamburger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    margin-right: 1rem; /* Ensure space between hamburger and other elements */
}

header .hamburger-menu span {
    height: 3px;
    width: 25px;
    background: #fff;
    margin: 4px;
    transition: transform 0.3s, background 0.3s;
}

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

header .nav-links li a {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background 0.3s;
}

header .nav-links li a:hover {
    background: var(--accent-color);
}

/* Toggle Mode Button */
header .toggle-mode {
    background: none;
    border: none;
    cursor: pointer;
    margin-left: auto; /* Ensure it stays at the far right */
    display: flex;
    align-items: center;
}

header .toggle-mode img {
    width: 24px; /* Adjust size as needed */
    height: 24px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    header .nav-links {
        display: none;
        flex-direction: column;
        gap: 1rem;
        background: var(--primary-color);
        position: absolute;
        top: 60px;
        right: 0;
        padding: 1rem;
        width: 200px;
        opacity: 0;
        transform: translateY(-20px);
        transition: transform 0.3s, opacity 0.3s;
    }

    header .nav-links.active {
        display: flex;
        transform: translateY(0);
        opacity: 1;
    }

    header .hamburger-menu {
        display: flex;
    }

    header .toggle-mode {
        display: none; /* Hide toggle mode button on mobile */
    }

    #hero .hero-content {
        padding: 1rem;
    }
}

/* Hero Section Styles */
#hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: #fff;
}

body.dark-mode #hero {
    background: linear-gradient(to right, var(--dark-bg), var(--secondary-color));
}

#hero .hero-content h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

#hero .hero-content p {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

#hero .hero-content button {
    padding: 0.75rem 1.5rem;
    background: var(--accent-color);
    border: none;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s;
}

#hero .hero-content button:hover {
    background: var(--primary-color);
}

#hero .social-links {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
}

#hero .social-links a {
    margin: 0.5rem 0;
    text-decoration: none;
    color: #fff;
    font-size: 1.5rem;
    transition: color 0.3s;
}

#hero .social-links a:hover {
    color: var(--accent-color);
}

/* Section Styles */
section {
    padding: 4rem 2rem;
    text-align: center;
}

#works .works-container,
#tech-stack .tech-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    
}

.work-item,
.icon {

    padding: 1rem;
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s;
}

body.dark-mode .work-item,
body.dark-mode .icon {
    background: #333;
    color: #fff;
}

.work-item:hover,
.icon:hover {
    transform: translateY(-5px);
}

.work-item img,
.icon img {
    width: 50%;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* Add box shadow */

    border-radius: 8px;
    transition: transform 0.3s;
}

.work-item p {
    margin: 0.5rem 0;
}

.work-item button {
    margin: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    background: var(--primary-color);
    color: #fff;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s;
}

.work-item button:hover {
    background: var(--accent-color);
}

#about .about-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#about .about-container img {
    width: 150px;
    margin-bottom: 1rem;
    border: 4px solid var(--primary-color);
}

#about .about-container p {
    max-width: 600px;
    line-height: 1.5;
    margin-top: 1rem;
    font-size: 1.1rem;
}

#tech-stack .icon {
    width: 60px;
    height: 60px;
    position: relative;
    padding: 0.5rem;
    border: 1px solid var(--secondary-color);
    border-radius: 8px;
    transition: border-color 0.3s;
}

#tech-stack .icon:hover {
    border-color: var(--primary-color);
}

#tech-stack .icon img {
    width: 100%;
}

#tech-stack .icon[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
}

/* Contact Form Styles */
#contact .contact-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

body.dark-mode #contact .contact-form {
    background: #333;
    color: #fff;
}

#contact .contact-form input,
#contact .contact-form textarea,
#contact .contact-form button {
    width: 100%;
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

#contact .contact-form textarea {
    resize: vertical;
}

#contact .contact-form button {
    background: var(--primary-color);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

#contact .contact-form button:hover {
    background: var(--accent-color);
}

/* Responsive Styles */
@media (max-width: 768px) {
    header .nav-links {
        display: none;
        flex-direction: column;
        gap: 1rem;
        background: var(--primary-color);
        position: absolute;
        top: 60px;
        right: 0;
        padding: 1rem;
        width: 200px;
        opacity: 0;
        transform: translateY(-20px);
        transition: transform 0.3s, opacity 0.3s;
    }

    header .nav-links.active {
        display: flex;
        transform: translateY(0);
        opacity: 1;
    }

    header .hamburger-menu {
        display: flex;
    }

    #hero .hero-content {
        padding: 1rem;
    }
}
