/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --background-color: #f9f9f9; /* Light mode */
    --text-color: #333; /* Default text color */
    --header-background: #ffffff;
    --link-color: #007bff;
    --button-background: #007BFF;
    --div-background: #ffffff;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color 0.5s, color 0.5s;
}

body.dark-mode {
    --background-color: #121212; /* Dark mode */
    --text-color: #ffffff; /* White text in dark mode */
    --header-background: rgba(255, 255, 255, 0.1);
    --link-color: #1e90ff;
    --button-background: #3a3a3a;
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

/* Header */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--header-background);
    transition: background-color 0.3s;
}

/* Navigation */
nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav a {
    text-decoration: none;
    color: var(--link-color);
    transition: color 0.3s;
}

nav a:hover {
    color: #0056b3;
}

/* Main Sections */
section {
    margin-bottom: 40px;
    padding: 20px;
    background-color: var(--div-background);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(0);
    opacity: 1;
    transition: transform 0.5s, opacity 0.5s;
}

section.fade-in {
    transform: translateY(20px);
    opacity: 0;
}

section.fade-in.visible {
    transform: translateY(0);
    opacity: 1;
}

/* Buttons */
button {
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

/* Project Items */
.project-item {
    transition: transform 0.3s;
}

.project-item:hover {
    transform: translateY(-5px);
}

/* Form Styling */
form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

input,
textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    transition: border-color 0.3s;
}

input:focus,
textarea:focus {
    border-color: var(--link-color);
    outline: none;
}

/* Footer */
footer {
    background-color: #f8f8f8;
    padding: 20px;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: center;
    }
    
    nav ul {
        flex-direction: column;
        gap: 10px;
    }
}

/* Button Styles */
.send-button {
    background-color: var(--button-background);
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: inline-block;
    margin-top: 10px;
}

.send-button:hover {
    background-color: #0056b3;
}

.send-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.5);
}

/* Dark Mode Styles */
body.dark-mode {
    --div-background: #1e1e1e; /* Dark gray for divs */
}

/* Text Colors */
h1, h2, p, footer, .text-muted-foreground {
    color: var(--text-color);
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode p,
body.dark-mode footer,
body.dark-mode .text-muted-foreground {
    color: white; /* White text in dark mode */
}

/* Transition for Toggle */
.toggle-checkbox:checked + .toggle-label {
    transform: rotate(180deg); /* Example of simple animation */
}

/* Optional: Media Query for User Preferences */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #121212;
        color: #ffffff;
    }
}

/* General text color for contact section */
.contact-info {
    color: black; /* Ensure the text is black */
}

/* Adjust footer styling for consistent text color */
footer {
    color: black; /* Ensure footer text is black */
}

body.dark-mode .contact-info {
    color: black; /* Override to keep black text in dark mode */
}

body.dark-mode footer {
    color: black; /* Ensure footer text is still black in dark mode */
}

.view-project-link {
    color: green; /* Set link color to green */
    text-decoration: none; /* Remove underline */
    transition: color 0.3s; /* Smooth color transition */
}

.view-project-link:hover {
    color: darkgreen; /* Darker green on hover */
    text-decoration: underline; /* Underline on hover for better visibility */
}
