/* Class 16 : Step 3 - padding count inside width not on top of  */
* {
    box-sizing: border-box;
}

/* Class 11 - Step 4: Basics */

:root {
    --text: #F1EFEC;
    --text-muted: #A9A6A3;
    --accent: #762B33;
    --background: #17191D;
    --border: #C9C1BC;
    --error: lightsalmon;
}
head {
    width: 100%;
}

body {
    font-family: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--background);
    line-height: 1.6;
    max-width: 90rem;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

h1 { 
    font-size: 3.0rem;   /* Class 12: Step 2 - my own scale */
    line-height: 1.1;
    margin-bottom: 0.25rem; 
}

header p { color: var(--text-muted); font-size: 1.1rem; margin-top: 0;}

header {
    /* Lab 12 : Task 4 - let the header stack when there isnt room */
    flex-wrap: wrap;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

h2 {
    font-size: 1.75rem;
    line-height: 1.2;
    margin-top: 2.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

p {
    font-size: 1rem;
    margin-bottom: 1rem;
}

/* Lab 12 : Task 3 - Footer */
/* Lab 14 : Task 4 - footer stacks on narrow screens */
footer { 
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
}
/* Lab 14 : Task 4 - footer stacks on narrow screens */
@media (min-width: 48rem) {
    footer {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* Lab 11 - Task 4 - Links */

a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    font-size: 1.75rem;
}

a:hover { 
    border-bottom-color: var(--accent);
}

.portrait {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50px;
}

section {
    margin-bottom: 3rem;
}

/* Lab 12 : Task 3 - list without bullets*/
ul {
    list-style: none;
    padding-left: 0;
}

li {
    margin-bottom: 0.75rem;
    padding-left: 1rem;
    border-left: 2px solid var(--accent);
    border-right: 14px solid transparent;
}

/* Class 13 : Step 3 : The nav bar */
/* Lab 13 : Step 4 - separate the var from the header*/
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-weight: 700;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
    margin-bottom: 2rem;
}


nav a:hover {
    border-bottom-color: var(--accent);

}

/* Lab 13 : Task 1 - Current color style */
nav a.current {
    border-bottom-color: var(--text-muted);
    color: var(--text-muted)
}
/* Lab 13 : Task 5 - On my own */
nav a:focus-visible {
    outline: 2px solid var (--accent); 
}
/* Lab 13 : Task 5 - On my own */
/*Lab 14 : Task 1 - The nav stacks on narrow screens */
nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex-direction: column; 
    align-items: flex-end; 
    gap: 0.75rem;
    List-style: none;
    padding: 0;
    margin: 0;
}

nav a {
    display: inline-block;
    font-size: 1.5rem;
    padding: 0.25rem;
}
/*Lab 14 : Task 1 - The nav stacks on narrow screens */
@media (min-width: 48rem) {
    nav ul {
        flex-direction: row;
        gap: 1.5rem;
    }
}

/* Class 14 : Task 2 - the cards go in a row*/
.cards {
    display: flex;
    /* Lab 14 : Task 6 - Allow wrapping */
    flex-wrap: wrap;
    /* Class 14 : Task 3 - stack by default */
    flex-direction: column;
    gap: 1.5rem;
}

.card {
    flex: 1;
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
}
/* Class 14 : Step 3 - a row when there's room*/
@media (min-width: 48rem) {
    .cards {
        flex-direction: row;
        gap: 1.5rem;
    }
}

/* Lab 14 : Task 5 - Fixed Image size */
img {
    max-width: 100%;
    height: auto;
}

body.Light {
    --text: #292629;
    --text-muted: #706B6D;
    --accent: #592027;
    --background: #F5F2EF;
    --border: #292B30;
    --error: crimson;
}

button {
    font: inherit;
    font-weight: 700;
    background-color: var(--accent);
    color: var(--background);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

/* Class 16 : Step 3 - the form */

form label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

form input, form textarea {
    font: inherit;
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border);
    scroll-padding-block-start: 5px;
    border-radius: 4px;
    background-color: var(--background);
    color: var(--text);
}

form input:focus, form textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

form button {
    font: inherit;
    font-weight: 700;
    color: var(--background);
    background-color: var(--accent);
    border: none;
    border-radius: 4px;
    min-height: 44px;
    padding: 0.6rem;
    cursor: pointer;
}

#form-status {
    font-weight: 700;
    color: var(red)
}

#Contact-Form .form-row {
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

#Contact-Form .form-row p {
    flex: 1;
    min-width: 0;
}

/* Lab 16 : Task 1 - The error state */
#Form-Status.error {
    color: var(--error);
}

/* Class 18 : Task 2 - the honeypot hidden from the people */
.hidden-field {
    display: none;
}