/* Global reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* --- easy knobs --- */
:root {
  /* Controls the vertical space the header occupies (title + the border line below it) */
  --header-h: 110px;

  /* How far the nav sits off the left edge */
  --sidebar-left-gap: 24px;
}

body {
  font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande',
               'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
  background-color: #FFF9DD;
  color: #222;
  display: flex;
  min-height: 100vh;
}

/* Title bar */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;

  /* Use a fixed height so everything can line up precisely */
  height: var(--header-h);

  /* Center the title nicely */
  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0 30px;
  font-size: 40px;
  letter-spacing: 1px;
  background: #FFF9DD; /* Default color that looked solid was #f9f9f9, I like cream though. Want to avoid yellow cream */
  border-bottom: 2px solid #ddd;
}

/* Sidebar navigation */
nav {
  width: 180px;

  /* Keep it under the header and "stick" as you scroll */
  position: sticky;
  top: var(--header-h);

  /* Space it away from the left edge a bit */
  margin-left: var(--sidebar-left-gap);

  /* No need to push with padding now that it's sticky */
  padding-top: 0;

  border-right: 2px solid #ddd;
  align-self: flex-start; /* ensure sticky works in flex container */
}

nav ul {
  list-style: none;
  padding: 20px 0; /* a little breathing room inside the sidebar */
}

nav li {
  margin-bottom: 20px;
}

nav a {
  position: relative;
  color: #000;            /* prevent default blue */
  text-decoration: none;  /* we'll do our own underline on hover */
}

/* Keep visited links from going purple */
nav a:link,
nav a:visited {
  color: #000;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0%;
  height: 1px;
  background: #000;
  transition: width 0.75s ease;
}

nav a:hover::after {
  width: 100%;
}

/* Content area */
main {
  flex: 1;

  /* Keep content clear of the fixed header; adjust extra spacing as you like */
  padding: calc(var(--header-h) + 20px) 40px 40px 40px;
}

/* Optional: make sure long pages don’t slide under the header when focusing anchors */
:target {
  scroll-margin-top: calc(var(--header-h) + 12px);
}

.gallery {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, 1fr);
  padding: 20px 0;
}

.gallery figure {
  margin: 0;
}

.gallery img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 3px solid #ddd;
  display: block;
}

.gallery figcaption {
  text-align: center;
  font-size: 0.9rem;
  color: #555;
  margin-top: 6px;
}