/* Class 16: Step 3: padding counts inside width, not on top of it */
* {
    box-sizing: border-box;
}
/* Class 1 1 · Step 4: the basics */
:root {
--text: #fffdfd; --text-muted: #cecece; --accent: #2563eb; --background: #7b6561; --border: #504240;

--error: crimson;
}
body.dark {
--error: lightsalmon;
}
body {
font-family: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--text);
background: var(--background);
line-height: 1.6;
max-width: 42rem;
margin: 0 auto;
padding: 3rem 1.5rem;
}
h1 { font-size: 2.5rem; line-height:5rem; margin-bottom: 0.25rem; } /* Class 12: Step 2: my own scale */
header p { color: var(--text-muted); font-size: 1.1rem; margin-top: 0; }
h2 {
font-size: 1.75rem;
line-height: 1.2rem;
margin-top: 2.5rem;
border-bottom: 1px solid var(--border); padding-bottom: 0.5rem;
margin-bottom: 1rem;

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

}
/* Lab 11 · Task 4: links */ 
a {
color: var(--text); 
text-decoration: none; 
border-bottom: 1px solid transparent;
a:hover { border-bottom-color: var(--text); }
}
p {
    font-size: 1.05rem;
    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;
}

@media (min-width: 40rem) { footer {
flex-direction: row;
justify-content: space-between; }
}
.portrait {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 50%;
}
section {
    margin-bottom: 3rem;
}
/* Class 12 · Step 4: spacing on purpose */
/* Lab 12 · Task 2: list without bullets */
ul{
    list-style: none;
    padding-left: 0;
}
li {
margin-bottom: 0.75rem; 
padding-left: .5rem;
border-left: 2px solid var(--background);

}
/* Lab 12 · Task 1: header side by side */ 
header {
display: flex; align-items: center; gap: 1.5rem;
}
/* Class 13: Step 3: the nav bar */
nav a {
    text-decoration: none;
    font-weight: 700;
    padding-bottom: 0.25rem;
    border-bottom: 2px solid transparent;

}
nav a:hover {
    border-bottom-color: var (var(--text));
}
/* Lab13 . Task 1: which page am I on */
nav a.current {
    border-bottom-color: var(--accent);
    color: var(--accent);

}



/* Lab 14 · Task 1: the nav stacks on narrow screens */ 
nav ul {
list-style: none; padding-left: 0; display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 2rem;
}
@media (min-width: 40rem) { 
    nav ul {
        flex-direction: row;
        gap: 1.5rem;
  }
}

/* Class 14 · Step 2: the cards go in a row */ 
/* Class 14 · Step 3: stack by default */ 
.cards {
display: flex; 
flex-direction: column; 
gap: 1.5rem;
justify-content: center; 
align-items: flex-start;
}
/* Class 14 · Step 3: a row when there's room */ 
/* Lab 14 · Task 6: center the card row */
@media (min-width: 40rem) {
.cards { 
    flex-direction: row;
    justify-content: center;
    flex: 0 1 18rem
} }

/* Lab 13 · Task 4: separate the bar from the header */ 
/* Lab 13 · Task 5: name as home link on left */
nav {
padding-bottom: 1rem;
border-bottom: 1px solid var(--border); 
margin-bottom: 2rem;
display: flex; justify-content: space-between; align-items: center; 
}

body.dark{
    --text: white; 
    --text-muted: silver; 
    --accent: skyblue; 
    --background: black; 
    --border: dimgray;}
    /* 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: 6px;
        background: var(--border);
        color: var(--text);
    }
    form input:focus, form textarea:focus {
        outline: 2px solid var(--accent);
        outline-offset: 1px;
    }

    form button {
        font: inherit;
        font-weight: 700;
        color: var(--text);
        background: var(--accent);
        border: none;
        border-radius: 6px;
        padding: 0.6rem 1.4rem; 
        cursor: pointer;

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


    }


/* Lab 16 · Task 1: the error state */ 
#form-status.error {
color: var(--error); }
/* Class 18: Step 2: honeypot, hidden from people */
.hidden-field{
    display: none;

}