:root{
  --color-accent: oklch(59.472% 0.17991 302.838 / 0.614); 
    accent-color: var(--color-accent);
}

body {
  /* Set line height to 1.5 times the font size
	   and use the OS’s UI font as the website font
	 */
    font: 100%/1.5 system-ui;
    max-width: 100ch;
    margin: 0 auto;
    padding: 1rem;
}
nav {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    margin-bottom: 2rem; 
    border-bottom: 1px solid oklch(80% 3% 200); 
}

nav a {
    text-decoration: none; 
    color: inherit; 
    flex: 1;
    text-align: center;
    padding: 0.5em;
}

nav a.current {
    font-weight: bold;
    border-bottom: 0.4em solid oklch(80% 3% 200);
    padding-bottom: 0.1em;
}
nav a:hover {
    border-bottom: 0.4em solid var(--color-accent); 
    padding-bottom: 0.1em; 
    background-color: oklch(from var(--color-accent) 95% 5% h)
}

input, textarea, button {
    font: inherit;
}

form {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: center;
}

/* Make labels go in the first column */
form label, form button {
    grid-column: 1 / -1; /* Span from first to last column */
    display: grid;
    grid-template-columns: subgrid; /* Inherit parent grid columns */
    align-items: center;
}

form input, form textarea {
    grid-column: 2; /* Place in second column of subgrid */
    box-sizing: border-box;
    width: 100%;
}

form label {
    display: grid;
    margin-block: 1rem;
}

form input, form textarea {
    padding: 0.5rem;
    border: 1px solid oklch(80% 3% 200);
    border-radius: 0.25rem;
}

form button {
    padding: 0.75rem;
    background-color: var(--color-accent);
    color: white;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    /* Reset grid placement for button since it's not a label */
    display: block;
    width: 100%;
}

form button:hover {
    opacity: 0.9;
}

.projects {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15em, 1fr));
    gap: 2rem;
}

.projects article {
    display: grid;
    grid-template-rows: subgrid; /* Inherit parent grid rows */
    grid-row: span 3; /* Each article spans 3 rows */
    gap: 1em; /* Space between content inside articles */
    
    padding: 1rem;
    border: 1px solid oklch(80% 3% 200);
    border-radius: 0.5rem;
}

/* Remove margins from headings for better alignment */
.projects article h2 {
    margin: 0;
}

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

/* Enable automatic light/dark mode support */
html {
    color-scheme: light dark;
}

/* Use system colors for better dark mode support */
body {
    background-color: canvas;
    color: canvastext;
}

nav {
  --border-color: oklch(50% 10% 200 / 40%);
  border-bottom-color: var(--border-color);
}

/* Style and position the color scheme switcher */
.color-scheme {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 88%;
    font-family: inherit; 
    z-index: 1000; /* Ensure it stays on top of other content */
}

/* Style the dropdown select element */
.color-scheme select {
    margin-left: 0.5rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    background: canvas;
    color: canvastext;
    font-size: inherit;
    font-family: inherit;
}

.color-scheme select:focus {
    outline: 2px solid oklch(60% 0.3 265);
    outline-offset: 1px;
}




