:root {
    --background-color: #ebf7f2;
    --text-color: #07140e;
    --text-color-header: #ffffff;
    --header-background: linear-gradient(135deg, #218256, #07140e);
    --project-background: #ffffff;
    --project-text-color: #07140e;
    --button-background: #218256;
    --button-hover: #53d99c;
}

.cv-button {
  display: inline-block;
  background: #1e6746;
  color: white;
  padding: 12px 24px;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background 0.3s;
}

.cv-button:hover {
  background: #1e6746;
}

body.dark {
    --background-color: #07120e;
    --text-color: #ecf8f3;
    --header-background: linear-gradient(135deg, #1e6746, #07120e);
    --project-background: #1e6746;
    --project-text-color: #ecf8f3;
    --button-background: #7cdeb1;
    --button-hover: #26ab6f;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

header {
    text-align: center;
    padding: 2rem;
    background: var(--header-background);
    color: var(--text-color-header);
    transition: background 0.3s ease, color 0.3s ease;
}

header h1, header p {
    color: var(--text-color-header);
}

header .logo img {
    max-width: 200px;
    margin-bottom: 1rem;
    animation: fadeIn 2s ease-in-out;
}

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

p {
    font-size: 1rem;
    opacity: 0.9;
}

main {
    padding: 2rem;
    text-align: center;
}

section {
    margin-bottom: 2rem;
}

.about h2, .links h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--button-background);
}

.about h2, .projects h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--button-background);
}

body.dark .about h2, body.dark .projects h2 {
    color: var(--button-background);
}

.btn {
    text-decoration: none;
    background-color: var(--button-background);
    color: white;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    border-radius: 5px;
    display: inline-block;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.btn:hover {
    background-color: var(--button-hover);
    transform: scale(1.1);
}

footer {
    text-align: center;
    padding: 1rem;
    background: var(--header-background);
    color: var(--text-color-header);
    position: relative;
}

footer p {
    margin: 0;
    color: #ffffff;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.projects {
    padding: 2rem;
    text-align: center;
}

.projects h2 {
    font-size: 2rem;
    color: var(--button-background);
    margin-bottom: 1.5rem;
}

.project {
    display: inline-block;
    width: 300px;
    margin: 1rem;
    background-color: var(--project-background);
    color: var(--project-text-color);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.project img {
    width: 100%;
    height: auto;
}

.project p {
    padding: 1rem;
    font-size: 1rem;
    color: var(--project-text-color);
}

.project .btn {
    display: block;
    margin: 1rem auto 1.5rem;
    text-decoration: none;
    background-color: var(--button-background);
    color: white;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.project .btn:hover {
    background-color: var(--button-hover);
}

#theme-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

#theme-toggle:hover {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }

    .project {
        width: 100%;
        max-width: 90%;
    }

    .btn {
        font-size: 0.9rem;
        padding: 0.7rem 1.2rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }

    .projects h2 {
        font-size: 1.5rem;
    }

    .btn {
        font-size: 0.8rem;
        padding: 0.6rem 1rem;
    }
}
