/*
 * Basic Stylesheet for a Static Website
 *
 * This file provides foundational styles for common HTML elements,
 * aiming for a clean, readable, and responsive design.
 *
 * Author: Gemini
 * Date: August 5, 2025
 */

/* --- Universal Box-Sizing --- */
/*
 * Applies border-box to all elements. This makes sizing elements
 * with padding and borders much more intuitive, as padding and border
 * are included in the element's total width and height.
 */
*, *::before, *::after {
    box-sizing: border-box;
}

/* --- Body Styles --- */
/*
 * Sets a base font, line height, and background color for the entire page.
 * Uses a responsive font size with 'rem' units for better accessibility.
 */
body {
    font-family: 'Inter', sans-serif; /* A modern, clean sans-serif font */
    line-height: 1.6; /* Improves readability */
    margin: 0; /* Removes default browser margin */
    padding: 20px; /* Adds some padding around the content */
    background-color: #f4f4f4; /* Light grey background */
    color: #333; /* Dark grey text color for good contrast */
    font-size: 1rem; /* Base font size, 16px by default in most browsers */
}

/* --- Container for Centering Content --- */
/*
 * A simple container class to center content and limit its width for readability.
 */
.container {
    max-width: 960px; /* Maximum width for the content area */
    margin: 0 auto; /* Centers the container horizontally */
    padding: 20px; /* Inner padding for content */
    background-color: #fff; /* White background for the content area */
    border-radius: 8px; /* Slightly rounded corners for a softer look */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}

/* --- Header Styles --- */
header {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.8rem;
    color: #2c3e50;
    margin-bottom: 0.5em;
}

header p {
    font-size: 1.1rem;
    color: #666;
}

/* --- Section Styles --- */
.content-section, .interactive-section {
    margin-bottom: 40px;
    padding: 20px;
    background-color: #fdfdfd;
    border-radius: 8px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
}

/* --- Headings (H1-H6) --- */
/*
 * Styles for headings, providing clear visual hierarchy.
 */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif; /* Consistent font for headings */
    color: #2c3e50; /* A slightly darker shade for emphasis */
    margin-top: 1.5em; /* Space above headings */
    margin-bottom: 0.8em; /* Space below headings */
    line-height: 1.2; /* Tighter line height for headings */
}

h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1em;
}

/* --- Paragraphs --- */
/*
 * Basic styling for paragraph text.
 */
p {
    margin-bottom: 1em; /* Space between paragraphs */
}

/* --- Links --- */
/*
 * Styles for hyperlinks, including hover effects.
 */
a {
    color: #3498db; /* A vibrant blue for links */
    text-decoration: none; /* Removes underline by default */
    transition: color 0.3s ease; /* Smooth transition for hover effect */
}

a:hover {
    color: #2980b9; /* Darker blue on hover */
    text-decoration: underline; /* Underline on hover for clarity */
}

/* --- Images --- */
/*
 * Makes images responsive, ensuring they don't overflow their containers.
 */
.responsive-image {
    max-width: 100%; /* Ensures images scale down to fit their parent */
    height: auto; /* Maintains aspect ratio */
    display: block; /* Removes extra space below images */
    margin: 1.5em auto; /* Centers image and adds vertical spacing */
    border-radius: 4px; /* Slightly rounded corners for images */
}

/* --- Buttons --- */
/*
 * A simple button style for interactive elements.
 */
.button {
    display: block; /* Make it a block element to take full width */
    width: fit-content; /* Adjust width to content */
    margin: 20px auto; /* Center the button */
    padding: 12px 25px;
    background-color: #2ecc71; /* Green background */
    color: #fff; /* White text */
    border: none;
    border-radius: 5px; /* Rounded corners */
    cursor: pointer; /* Indicates it's clickable */
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow */
}

.button:hover {
    background-color: #27ae60; /* Darker green on hover */
    transform: translateY(-2px); /* Slight lift effect */
}

.button:active {
    background-color: #229a55; /* Even darker on click */
    transform: translateY(0); /* Reset lift effect */
}

/* --- Message Box for JS Interaction --- */
.message-box {
    background-color: #ecf0f1; /* Light grey background */
    border: 1px solid #bdc3c7; /* Subtle border */
    padding: 15px;
    margin-top: 20px;
    border-radius: 6px;
    text-align: center;
    font-style: italic;
    color: #555;
}

/* --- Footer Styles --- */
footer {
    text-align: center;
    padding-top: 20px;
    margin-top: 40px;
    border-top: 1px solid #eee;
    color: #777;
    font-size: 0.9rem;
}

/* --- Responsive Adjustments (Basic Media Query) --- */
/*
 * Adjusts font sizes and container padding for smaller screens to improve readability on mobile devices.
 */
@media (max-width: 768px) {
    body {
        font-size: 0.9rem; /* Slightly smaller base font on mobile */
        padding: 10px;
    }

    .container {
        padding: 15px;
        margin: 0 10px; /* Add some side margin on smaller screens */
    }

    header h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    .button {
        width: 90%; /* Make button wider on small screens */
        padding: 10px 15px;
        font-size: 1rem;
    }
}
