@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --bg-color: #f4f6f8;
    --content-bg: #ffffff;
    --text-color: #333333;
    --heading-color: #003366;
    --accent-color: #007bff;
    --accent-color-hover: #0056b3;
    --header-bg: linear-gradient(90deg, #0056b3 0%, #007bff 100%);
    --header-text: #ffffff;
    --footer-bg: #212529;
    --footer-text: #e9ecef;
    --card-shadow: 0 6px 18px rgba(0, 0, 0, 0.07);
    --card-border: 1px solid #e0e0e0;
}

body.dark-mode {
    --bg-color: #121729;
    --content-bg: #1e253c;
    --text-color: #c0c8d9;
    --heading-color: #ffffff;
    --accent-color: #00f5c3;
    --accent-color-hover: #00b894;
    --header-bg: linear-gradient(90deg, #1d2b4b 0%, #121729 100%);
    --header-text: #ffffff;
    --footer-bg: #121729;
    --footer-text: #a0a8b9;
    --card-shadow: 0 6px 18px rgba(0, 245, 195, 0.05);
    --card-border: 1px solid #3a476a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.7;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 25px;
}

h1, h2, h3, h4 {
    margin-bottom: 15px;
    color: var(--heading-color);
    font-weight: 600;
}

p {
    margin-bottom: 18px;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

img {
    max-width: 100%;
    height: auto;
}

header {
    background: var(--header-bg);
    color: var(--header-text);
    padding: 15px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

header .logo h1 {
    margin: 0;
    font-size: 26px;
}

header .logo a {
    color: var(--header-text);
    text-decoration: none;
}

header nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

header nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
}

header nav a {
    color: var(--header-text);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
    opacity: 0.9;
}

header nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--accent-color);
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform 0.3s ease-out;
    transform-origin: bottom left;
}

header nav a:hover,
header nav a.active {
    opacity: 1;
}

header nav a:hover::after,
header nav a.active::after {
    transform: scaleX(1);
}

.theme-switcher {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.theme-switcher input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 26px;
}

.slider:before {
    position: absolute;
    content: "☀️";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
    font-size: 14px;
    text-align: center;
    line-height: 20px;
}

body.dark-mode .slider:before {
    content: "🌙";
}

input:checked + .slider {
    background-color: var(--accent-color);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

main {
    padding: 40px 0;
}

.fotoEdu {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    float: left;
    margin: 0 20px 20px 0;
    border: 6px solid var(--accent-color);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.5s ease-in-out, filter 0.5s ease;
    filter: grayscale(20%);
}

.content {
    background-color: var(--content-bg);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-pic {
    max-width: 280px;
    height: auto;
    border-radius: 50%;
    float: right;
    margin: 0 0 25px 40px;
    border: 6px solid var(--accent-color);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.5s ease-in-out, filter 0.5s ease;
    filter: grayscale(20%);
}

.profile-pic:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 40px rgba(0, 245, 195, 0.3);
    filter: grayscale(0%);
    border-color: var(--accent-color-hover);
}

body:not(.dark-mode) .profile-pic:hover {
     box-shadow: 0 15px 40px rgba(0, 123, 255, 0.4);
}

.content::after {
    content: "";
    display: table;
    clear: both;
}

.content h2 {
    margin-bottom: 25px;
}

.content h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    border-left: 5px solid var(--accent-color);
    padding-left: 12px;
    font-size: 1.9em;
}

.card {
    background-color: var(--bg-color);
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 25px;
    border: var(--card-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    text-align: center;
    padding: 40px 0;
    margin-top: 50px;
    border-top: 4px solid var(--accent-color);
}

footer p {
    margin: 5px 0;
    opacity: 0.8;
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 15px;
    }

    header nav {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    header nav ul {
        justify-content: center;
        width: 100%;
    }

    .content, .card {
        padding: 25px;
    }

    .profile-pic {
        float: none;
        display: block;
        margin: 20px auto 30px auto;
        max-width: 250px;
    }

    header .logo h1 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
        line-height: 1.6;
    }

    header {
        padding: 10px 0;
    }

    header nav ul {
        flex-direction: column;
        gap: 8px;
    }

    .container {
        padding: 0 15px;
    }

    .content {
        padding: 20px;
        border-radius: 10px;
    }

    h1, h2, h3 {
        font-size: 1.2em;
    }

    .profile-pic {
        max-width: 180px;
        margin: 15px auto 25px auto;
    }

    .fotoEdu {
        width: 80px;
        height: 80px;
        margin: 0 auto 15px auto;
        display: block;
        float: none;
    }

    footer {
        padding: 25px 0;
        font-size: 14px;
    }

    .theme-switcher {
        width: 40px;
        height: 22px;
    }

    .slider:before {
        height: 16px;
        width: 16px;
        font-size: 12px;
        line-height: 16px;
    }
}
