/* Reset some default styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #cce7ff;
    color: #333;
    padding: 20px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

header {
    background-color: #222;
    color: #fff;
    padding: 40px 20px;
    text-align: center;
    border-radius: 8px;
    margin-bottom: 20px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header p {
    max-width: 800px;
    margin: 0 auto 20px;
    font-size: 1.1rem;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    padding-top: 10px;
}

nav a {
    color: #00bfff;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

nav a:hover {
    color: #ffcc00;
}

section {
    background-color: #e0f2ff;
    padding: 30px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

section h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #444;
}

figure {
    display: inline-block;
    margin: 10px;
    text-align: center;
    width: 250px;
    height: 300px;
    padding: 10px;
    background: #fff;
    overflow: hidden;
    animation: fadeIn 1s ease-in-out;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

figure img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
    transition: transform 0.3s ease;
}

figure img:hover {
    transform: scale(1.05);
}

figcaption {
    margin-top: 8px;
    font-size: 0.95rem;
    color: #555;
}

footer {
    text-align: center;
    padding: 20px;
    margin-top: 20px;
    background-color: #222;
    color: #fff;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

footer a {
    color: #00bfff;
    text-decoration: none;
}

@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        align-items: center;
    }

    figure {
        width: 90%;
        height: auto;
    }

    figure img {
        height: auto;
        object-fit: contain;
    }
}

/* Dark mode toggle */
body.dark-mode {
    background-color: #121212;
    color: #f4f4f4;
}

body.dark-mode header,
body.dark-mode footer {
    background-color: #1e1e1e;
}

body.dark-mode section {
    background-color: #1a1a1a;
}

body.dark-mode nav a {
    color: #4fc3f7;
}

body.dark-mode nav a:hover {
    color: #ffd54f;
}

/* Fade-in animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
} 

/* Toggle switch style (optional JS-based) */
.toggle-darkmode {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #444;
    color: #fff;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    z-index: 1000;
    transition: background-color 0.3s;
}

.toggle-darkmode:hover {
    background-color: #666;
}


 


