/* Reset and base styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

html, body {
    height: 100%;
}

body {
    background-color: #f4f4f9;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    font-size: 16px;
}

/* Header and navigation */
header {
    background-color: #1f2937;
    padding: 1rem 0;
}

.nav-menu {
    display: flex;
    justify-content: center;
    list-style: none;
    flex-wrap: wrap;
}

.nav-menu li {
    margin: 0 1rem;
}

.nav-menu a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background 0.3s;
}

.nav-menu a:hover, .nav-menu a.active {
    background-color: #4f46e5;
}

/* Main content */
main {
    flex: 1;
    padding: 2rem;
    max-width: 900px;
    margin: auto;
}

/* Figure Section */
.figure {
    text-align: center;
    background: linear-gradient(135deg, #f9f9f9, #ffffff);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.figure img {
    max-width: 90%;
    border-radius: 10px;
    margin: 1rem 0;
    transition: transform 0.3s;
}

.figure img:hover {
    transform: scale(1.05);
}

/* Contributions Section */
.contributions ul {
    margin-left: 1.5rem;
    list-style-type: disc;
    color: #555;
}

/* Caesar Cipher Section */
.caesar-cipher {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-top: 2rem;
    color: #333;
}

.caesar-cipher p {
    font-size: 1.2rem;
    line-height: 1.7;
}

/* Legacy Section */
.legacy {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-top: 2rem;
    color: #333;
}

.legacy p {
    line-height: 1.7;
}

/* Quote Section */
.quote {
    background-color: #4f46e5;
    color: white;
    padding: 2rem;
    text-align: center;
    border-radius: 8px;
    margin-top: 2rem;
    font-style: italic;
}

.quote blockquote {
    margin: 0;
    font-size: 1.2rem;
}

/* Timeline Section */
.timeline ul {
    list-style-type: none;
    margin-top: 1.5rem;
}

.timeline li {
    padding: 0.8rem 0;
    border-bottom: 1px solid #ccc;
}

.timeline li strong {
    color: #1f2937;
}

/* Links Block */
.links {
    text-align: center;
    margin-top: 2rem;
}

.links a {
    color: #f4f4f9;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.links a:hover {
    color: #ffffff;
}

/* Footer */
footer {
    text-align: center;
    padding: 1rem 0;
    background-color: #1f2937;
    color: white;
    margin-top: 2rem;
}

/* Buttons */
.button, button {
    display: inline-block;
    margin: 0.5rem;
    padding: 0.8rem 1.5rem;
    background-color: #4f46e5;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.button:hover, button:hover {
    background-color: #3730a3;
    transform: translateY(-2px);
}

/* Form Section */
.form-section {
    max-width: 600px;
    margin: 2rem auto;
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.form-section p {
    margin-bottom: 1rem;
    text-align: center;
    color: #555;
}

/* Inputs, textarea, select */
.form-section input[type="text"],
.form-section input[type="email"],
.form-section select,
.form-section textarea {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 1rem;
    transition: border 0.3s, box-shadow 0.3s;
}

.form-section input:focus,
.form-section select:focus,
.form-section textarea:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 5px rgba(79,70,229,0.3);
    outline: none;
}

/* Textarea */
.form-section textarea {
    resize: vertical;
}

/* Result / Message box */
.result {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 5px;
    min-height: 50px;
    font-weight: bold;
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
    }

    .form-section {
        margin: 1rem;
        padding: 1.5rem;
    }
}