@font-face {
  font-family: "Cabinet Grotesk";
  src: url("../fonts/CabinetGrotesk-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Cabinet Grotesk";
  src: url("../fonts/CabinetGrotesk-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Humane";
  src: url("../fonts/Humane-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --ink: #111111;
  --muted: #8c8c8c;
  --line: #e4e4e4;
  --bg: #ffffff;
  --sidebar-width: 280px;
  --gap: 18px;
  font-family: "Cabinet Grotesk", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line);
}

a:hover {
  text-decoration-color: var(--ink);
}

.layout {
  display: flex;
  min-height: 100vh;
  align-items: flex-start;
}

/* Sidebar, identical on every page, never moves */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  padding: 40px 28px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sidebar-top .name-link {
  text-decoration: none;
  color: inherit;
}

.sidebar-top .name {
  font-family: "Humane", "Cabinet Grotesk", sans-serif;
  font-size: 18px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 24px 0;
}

.sidebar-top .avatar {
  width: 96px;
  height: 96px;
  object-fit: cover;
  filter: grayscale(100%);
  display: block;
  margin-bottom: 32px;
  background: #f2f2f2;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}

.sidebar nav a.active {
  text-decoration-color: var(--ink);
}

.sidebar-bottom {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.sidebar-bottom a {
  color: var(--muted);
}

/* Main content area */
.content {
  flex: 1;
  padding: 40px 32px 80px 0;
  min-width: 0;
}

.subnav {
  display: flex;
  gap: 18px;
  font-size: 13px;
  margin-bottom: 28px;
}

.subnav a {
  color: var(--muted);
}

.subnav a.active {
  color: var(--ink);
  text-decoration-color: var(--ink);
}

.intro {
  max-width: 620px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: 36px;
}

/* Grid, purely data driven, removing an item just closes the gap */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: var(--gap);
}

.grid figure {
  margin: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #f2f2f2;
  position: relative;
}

.grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.grid figure.multi {
  cursor: pointer;
}

.grid .dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.grid figure:hover .dots {
  opacity: 1;
}

.grid .dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
}

.grid .dots span.active {
  background: #ffffff;
}

.grid.empty::after {
  content: attr(data-empty-label);
  grid-column: 1 / -1;
  font-size: 13px;
  color: var(--muted);
  padding: 40px 0;
}

/* Home page, sidebar only */

@media (max-width: 800px) {
  .layout {
    flex-direction: column;
  }
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
  }
  .sidebar-top, .sidebar-bottom {
    display: none;
  }
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .content {
    padding: 24px;
  }
}
