/* ============ EDIT THESE FIRST ============ */
:root {
  --blue-lightest: #f1f8fd;   /* sidebar background */
  --blue-light:    #d9ecf9;   /* header background, placeholders */
  --blue-border:   #aed2ec;   /* borders */
  --orange:        #c85a0e;   /* dark orange: name, headings, hover */
  --orange-dark:   #9f4509;   /* darker orange for active links */
  --text:          #222222;
  --text-light:    #5a6b78;

  --font-size:     12px;      /* base font size (small like McMaster) */
  --header-height: 44px;
  --sidebar-width: 190px;
}

/* ============ BASIC SETUP ============ */
* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;           /* the whole page never scrolls */
}

body {
  font-family: Arial, Helvetica, sans-serif;
  font-size: var(--font-size);
  line-height: 1.5;
  color: var(--text);
  background: #ffffff;
}

a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============ HEADER (fixed at top) ============ */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: var(--blue-light);
  border-bottom: 2px solid var(--orange);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  z-index: 10;
}
.header-left  { display: flex; align-items: baseline; gap: 12px; }
.header-right { display: flex; gap: 16px; }

.site-name  { font-size: 16px; font-weight: bold; color: var(--orange); }
.site-title { color: var(--text-light); }

/* ============ SIDEBAR (fixed at left, scrolls by itself if long) ============ */
#sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--blue-lightest);
  border-right: 1px solid var(--blue-border);
  overflow-y: auto;
  padding: 8px 0;
}

#sidebar a {
  display: block;
  color: var(--text);
}
#sidebar a:hover { color: var(--orange); text-decoration: none; background: var(--blue-light); }

.side-top {
  padding: 4px 16px;
  font-weight: bold;
}
.side-heading {
  margin-top: 12px;
  padding: 3px 16px;
  font-weight: bold;
  color: var(--orange);
  text-transform: uppercase;
  font-size: 11px;
  border-bottom: 1px solid var(--blue-border);
}
.side-link { padding: 2px 16px 2px 24px; }

#sidebar a.active {
  color: var(--orange-dark);
  font-weight: bold;
  background: var(--blue-light);
  border-left: 3px solid var(--orange);
}

/* ============ MAIN CONTENT (the only part that scrolls) ============ */
#content {
  position: fixed;
  top: var(--header-height);
  left: var(--sidebar-width);
  right: 0;
  bottom: 0;
  overflow-y: auto;
  padding: 16px 24px 40px 24px;
}

h1 { font-size: 20px; margin: 0 0 4px 0; color: var(--orange); }
h2 {
  font-size: 14px;
  margin: 20px 0 8px 0;
  padding-bottom: 3px;
  color: var(--orange);
  border-bottom: 1px solid var(--blue-border);
}
p { margin: 0 0 10px 0; max-width: 750px; }
.meta { color: var(--text-light); margin-bottom: 12px; }

/* ============ HOME PAGE PROJECT GRID ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));  /* change 150px for bigger/smaller cards */
  gap: 12px;
}
.card {
  display: block;
  padding: 6px;
  border: 1px solid var(--blue-border);
  color: var(--text);
}
.card:hover { border-color: var(--orange); text-decoration: none; }
.card img, .thumb-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  margin-bottom: 6px;
}
.thumb-placeholder {
  background: var(--blue-light);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-title { font-weight: bold; color: var(--orange); }
.card-text  { color: var(--text-light); font-size: 11px; }

/* ============ PROJECT PAGE ============ */
.project-image {
  max-width: 750px;
  width: 100%;
  margin: 8px 0 12px 0;
}
.placeholder {
  max-width: 750px;
  aspect-ratio: 16 / 9;
  background: var(--blue-light);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px 0 12px 0;
}
ul { margin: 0 0 10px 0; padding-left: 18px; }

/* ============ SMALL SCREENS ============ */
@media (max-width: 700px) {
  :root { --sidebar-width: 120px; }
  .header-right a:nth-child(n+3) { display: none; }
}