:root {
    --background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --foreground: hsl(20, 14.3%, 4.1%);
    /* light “muted” surface (was hsl(220,4.8%,95.9%)) */
    --muted: hsl(30, 5%, 96%);

    /* text on that surface (was hsl(25,5.3%,44.7%)) */
    --muted-foreground: hsl(30, 6%, 45%);

    /* card uses your main background/foreground elsewhere */
    --card: var(--background);
    --card-foreground: var(--foreground);

    /* border line (was hsl(20,5.9%,90%)) */
    --border: hsl(30, 6%, 90%);

    /* your primary blue stays */
    --primary: #336699;
    --primary-foreground: hsl(211, 100%, 99%);

    /* secondary now matches the muted light orange */
    --secondary: var(--muted);
    /* text on secondary (was hsl(24,9.8%,10%)) */
    --secondary-foreground: hsl(30, 10%, 12%);

    --radius: 0.5rem;
    --shadow: rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background: var(--background);
    color: var(--foreground);
}

header {
    background: var(--card);
    color: var(--foreground);
    padding: 30px 15px;
    text-align: center;
    box-shadow: 0 4px 10px var(--shadow);
}

nav {
    background: var(--card);
    box-shadow: 0 2px 5px var(--shadow);
    padding: 10px 0;
    display: flex;
    justify-content: center;
    max-width: 420px;
    /* Set a maximum width for the navbar */
    margin: 0 auto;
    /* Center the navbar */
    border-radius: var(--radius);
    /* Optional: Add border radius for rounded corners */
    font-weight: 700;
}

nav a {
    color: black;
    /* Use primary foreground color for text */
    text-align: center;
    padding: 12px 20px;
    /* Adjust padding for better spacing */
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
    /* Add transition for hover effects */
    border-radius: var(--radius);
    /* Add border radius for rounded corners */

}

nav a:hover {
    background-color: var(--primary);
    /* Change background on hover */
    color: var(--primary-foreground);
    /* Ensure text color contrasts */
    transform: scale(1.05);
}

nav a.active {
    background-color: var(--primary);
    /* Highlight active link */
    color: var(--primary-foreground);
    /* Ensure text color contrasts */
}

.floating-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    cursor: pointer;
    display: none;
    /* Hidden by default */
}

.floating-button.show {
    display: block;
    /* Show when scrolled down */
}

footer {
    text-align: center;
    padding: 10px;
    background: var(--card);
    color: var(--foreground);
    box-shadow: 0 -2px 10px var(--shadow);
}

footer a {
    color: var(--primary);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

h1,
h2,
h3,
h4 {
    margin: 0;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    margin: 40px 0 20px;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 10px;
}

h3 {
    font-size: 1.5rem;
    margin: 10px 0;
}

h4 {
    font-size: 1.2rem;
    margin: 10px 0;
    font-weight: 600;
}

section {
    padding: 10px;
    max-width: 1200px;
    margin: auto;
}

.link-container {
    display: flex;
    /* Enable flexbox */
    justify-content: space-between;
    /* Distribute items with space between */
    align-items: center;
    /* Vertically center items */
    height: 100px;
}

.link-container *:first-child {
    flex-grow: 1;
}

.link-container *:not(:first-child) {
    flex-grow: 0;
}

#timeline {
    position: relative;
    padding: 20px;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timeline-item {
    position: relative;
    width: 45%;
    margin-bottom: 20px;
}

.timeline-item.left {
    align-self: flex-start;
    text-align: left;
}

.timeline-item.right {
    align-self: flex-end;
    text-align: left;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 15px;
    box-shadow: 0 2px 5px var(--shadow);
    transition: box-shadow 0.3s;
}

.card:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--primary-foreground);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
    text-align: center;
    top: -10px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    /* Line thickness */
    background: #ccc;
    /* Line color */
    left: 50%;
    transform: translateX(-50%);
    z-index: -1;
    /* Behind the items */
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.project-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: 0 2px 10px var(--shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 20px;
}

.project-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 4px 20px var(--shadow);
}

.project-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
}

.project-card p {
    margin: 10px 0;
}

.project-card a {
    display: inline-block;
    margin-top: 10px;
    color: var(--primary);
    text-decoration: none;
    font-weight: bold;
    border: 2px solid var(--primary);
    padding: 10px 15px;
    border-radius: var(--radius);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.project-card a:hover {
    background-color: var(--primary);
    color: var(--primary-foreground);
}

/* General styles for the filter buttons */
.filter-buttons {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.filter-buttons button {
    background-color: transparent;
    /* Transparent background for unselected */
    color: var(--primary);
    /* Text color */
    border: 2px solid var(--primary);
    /* Border color */
    border-radius: var(--radius);
    padding: 10px 15px;
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s, color 0.3s;
    /* Added color transition */
}

.filter-buttons button:hover {
    background-color: rgba(0, 123, 255, 0.1);
    /* Light background on hover */
    transform: scale(1.05);
}

/* Style for the selected filter button */
.filter-buttons button.selected {
    background-color: var(--primary);
    /* Filled background for selected button */
    color: var(--primary-foreground);
    /* Change text color for contrast */
    font-weight: bold;
    /* Make the text bold */
}

/* Button styles */
button {
    background-color: var(--primary);
    color: var(--primary-foreground);
    border: none;
    border-radius: var(--radius);
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

button:hover {
    background-color: hsl(200, 80%, 60%);
    transform: scale(1.05);
}

.link-container button.download-button {
    background-image: linear-gradient(to bottom, #4CAF50, #388E3C);
    color: white;
    border: none;
    border-radius: var(--radius);
    padding: 15px 25px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2);
    /* Subtle shadow */
}

/* Input and textarea styles */
input,
textarea {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
    margin-top: 10px;
}

input:focus,
textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 5px var(--primary);
}

/* Media Queries for Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .project-grid {
        grid-template-columns: 1fr;
        /* Stack projects on smaller screens */
    }
}