/* General Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.4;
    padding: 10px;
    font-size: 14px; /* Reduce font size */
}

header, footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
    font-size: 14px; /* Reduce font size */
}

nav {
    margin: 10px 0;
}

nav a {
    color: #fff;
    margin: 0 10px;
    text-decoration: none;
    padding: 5px;
    border-radius: 5px;
    font-size: 14px; /* Reduce font size */
}

nav a:hover {
    background-color: #555;
    text-decoration: underline;
}

section {
    padding: 10px;
    margin-bottom: 10px;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

ul, #skills ul, #testimonials ul {
    list-style-type: none;
    padding: 0;
}

li {
    margin-bottom: 10px;
}

form {
    display: flex;
    flex-direction: column;
}

form label {
    margin-top: 5px;
}

form input, form textarea {
    margin-top: 5px;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px; /* Reduce font size */
}

form button {
    margin-top: 5px;
    padding: 5px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px; /* Reduce font size */
}

form button:hover {
    background-color: #555;
}

footer a {
    color: #fff;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

#skills li, #testimonials li {
    background: #eee;
    margin: 5px 0;
    padding: 5px;
    border-radius: 5px;
}

#back-to-top {
    position: fixed;
    bottom: 10px;
    right: 10px;
    padding: 5px 10px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: none;
    font-size: 14px; /* Reduce font size */
}

#back-to-top:hover {
    background-color: #555;
}

#loading-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

#dark-mode-toggle {
    position: fixed;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px; /* Reduce font size */
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin-top: 5px;
}

#over {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 20px;
    padding-left: 0;
}

.profile-photo {
    width: 80px; /* Adjust the width as needed */
    height: auto; /* Maintain the aspect ratio */
    border-radius: 0; /* This will make the image square */
    margin: 0; /* Remove the auto margins */
    padding: 0;
    margin-left: -10px; /* Move image more to the left */
}

#over div {
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Align text to the start */
}

/* Dark Mode */
body.dark-mode {
    background-color: #333;
    color: #fff;
}

body.dark-mode header,
body.dark-mode footer,
body.dark-mode #dark-mode-toggle,
body.dark-mode #back-to-top {
    background-color: #555;
}

body.dark-mode section,
body.dark-mode .modal-content {
    background-color: #444;
    color: #fff;
}

body.dark-mode nav a,
body.dark-mode footer a {
    color: #fff;
}

body.dark-mode .progress-bar {
    background-color: #555;
}

body.dark-mode .progress {
    background-color: #888;
}

body.dark-mode #dark-mode-toggle:hover,
body.dark-mode #back-to-top:hover {
    background-color: #777;
}

/* Light Mode */
body.light-mode {
    background-color: #fff;
    color: #000;
}

body.light-mode header,
body.light-mode footer,
body.light-mode #dark-mode-toggle,
body.light-mode #back-to-top {
    background-color: #f0f0f0;
}

body.light-mode section,
body.light-mode .modal-content {
    background-color: #fff;
    color: #000;
}

body.light-mode nav a,
body.light-mode footer a {
    color: #000;
}

body.light-mode .progress-bar {
    background-color: #e0e0e0;
}

body.light-mode .progress {
    background-color: #ccc;
}

body.light-mode #dark-mode-toggle:hover,
body.light-mode #back-to-top:hover {
    background-color: #ccc;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section.animate {
    animation: fadeIn 1s forwards;
}

.progress-bar {
    background: #ddd;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 5px;
}

.progress {
    background: #333;
    height: 15px; /* Reduce height */
    border-radius: 5px;
    transition: width 0.5s ease-in-out; /* Smooth transition */
}

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 10px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px; /* Reduce max width */
    border-radius: 5px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 24px; /* Reduce font size */
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.carousel-item {
    display: none;
    text-align: center;
    padding: 10px; /* Reduce padding */
    transition: transform 0.5s ease-in-out; /* Smooth sliding effect */
}

.carousel-item.active {
    display: block;
}

.flex-container {
.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 equal columns */
    grid-gap: 20px; /* space between items */
}

.grid-item {
    padding: 10px;
    background-color: #f4f4f4;
    border: 1px solid #ccc;
    border-radius: 5px;
}

    display: flex;
    flex-direction: row; /* or column */
    justify-content: space-between; /* or other values like center, flex-start, flex-end */
    align-items: center; /* or other values like stretch, flex-start, flex-end */
    gap: 20px; /* space between items */
}

.flex-item {
    flex: 1; /* grow and shrink as needed */
    padding: 10px;
    background-color: #f4f4f4;
    border: 1px solid #ccc;
    border-radius: 5px;
}
