/* Class 16: Step 3: padding counts inside width, not ontop of it */
* {
  box-sizing: border-box;
}

/* Class 11 · Step 4: the basics */
:root {
  --text: #110606;
  --text-muted: #3a3c3e;
  --accent: #0d5cbd;
  --background: #e8e8e8;
  --border: #47b6e9;
  --error: crimson;
}
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: 3rem; /* 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: 1;
}
h2 {
  font-size: 1.75rem;
  margin-top: 2.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

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

/* Lab 11 · Task 4: links */  
a {
  color: var(--accent);
  text-decoration: none; 
  border-bottom: 1px solid transparent;
}
a:hover {
  border-bottom-color: var(--accent);
}

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

section {
  margin-bottom: 3rem;
}

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

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

/* Lab 12 · Task 1: header side by side */
header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  /* Lab 12 · Task 4: let the header stack when there isn't room */
  flex-wrap: wrap;

}

/* Lab 14 · Task 4: footer stacks on narrow screens */
/* Lab 12 · Task 3: footer */
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;
  }
}


/* Class 13: Step 3: the nav bar */
/* 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: 0.5rem;
  text-decoration: none;
  font-weight: 700;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid transparent;

}

@media (min-width: 40rem) {
  nav ul {
    flex-direction: row;
    gap: 1.5rem;
  }
}

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

/*Lab 13: Task 1: which page I am on*/
nav a.current {
  border-bottom-color: var(--accent);
  color: var(--accent);
}
/* Lab 13 · Task 4: separate the bar from the header */
nav {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

nav a:hover { 
  background: var(--panel); 
  padding: 0.25rem 0.5rem;
}
 
/* Class 14 · Step 2: the cards go in a row */
/* Class 14 · Step 3: stack by default */
.cards {
  display: flex;
  gap: 1.5rem;
  flex-direction: column;
}

.card {
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: 1.5rem;
  flex: 1;
}

/* Class 14 · Step 3: a row when there's room */
@media (min-width: 50rem) {
  .cards {
  flex-direction: row;
  }
}

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


header { 
  min-height: 40vh; 
  display: flex; 
  flex-direction: column; 
  justify-content: center; 
  align-items: center;
  text-align: center;
}

body.dark {
  --text: white;
  --text-muted: silver;
  --accent: rgb(247, 248, 249);
  --background: rgba(32, 31, 31, 0.903);
  --border: rgb(84, 96, 188); 
  --error: rgb(196, 85, 41); 
}

/* Class 16: Step 3: the form */
form label{
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 700;
}

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

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

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

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

/* Lab 16 · Task 1: the error state */
#form-status.error {
color: var(--error);
}

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